@charset "UTF-8";

:root {
    --color-primary: #8B5A2B;
    --color-primary-dark: #6B4423;
    --color-primary-light: #A0522D;
    --color-secondary: #D2691E;
    --color-accent: #CD853F;
    --color-background: #FFF8F0;
    --color-surface: #FFFFFF;
    --color-surface-elevated: #FFFAF5;
    --color-text-primary: #3E2723;
    --color-text-secondary: #6D4C41;
    --color-text-muted: #9E9E9E;
    --color-border: #E0D5C8;
    --color-border-light: #F0E5DA;
    --color-success: #4CAF50;
    --color-warning: #FF9800;
    --color-error: #F44336;
    --color-coin: #FFD700;
    --color-exp: #9C27B0;
    --shadow-sm: 0 1px 3px rgba(62, 39, 35, 0.08);
    --shadow-md: 0 4px 12px rgba(62, 39, 35, 0.12);
    --shadow-lg: 0 8px 24px rgba(62, 39, 35, 0.16);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50%;
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    background: linear-gradient(135deg, var(--color-background) 0%, #FFF5EB 100%);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow: hidden;
}

#game-container {
    width: 100%;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    background: var(--color-background);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
}

#login-screen {
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, #FFF8F0 0%, #F5E6D3 100%);
}

.login-box {
    background: var(--color-surface);
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    width: 90%;
    max-width: 360px;
    animation: slideUp 0.6s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    margin-bottom: 32px;
}

.coffee-icon {
    font-size: 64px;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.logo .subtitle {
    font-size: 14px;
    color: var(--color-text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 16px;
    color: var(--color-text-primary);
    background: var(--color-surface);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.login-form input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.15);
}

.login-form input::placeholder {
    color: var(--color-text-muted);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 90, 43, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary) 100%);
    box-shadow: 0 6px 16px rgba(139, 90, 43, 0.4);
}

.btn-primary:disabled {
    background: var(--color-border);
    color: var(--color-text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-surface-elevated);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-danger {
    background: var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #D32F2F;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

#main-screen {
    background: var(--color-background);
}

#main-screen .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.main-game-layout {
    display: flex;
    gap: 12px;
    padding: 12px;
    flex: 1;
    overflow: hidden;
}

.coffee-shop-section,
.make-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.shop-header,
.make-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
}

.shop-header h3,
.make-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.coffee-shop-section .scene,
.make-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.order-title {
    font-weight: 600;
    color: var(--color-text-primary);
}

.cancel-order-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--color-error);
    color: white;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.cancel-order-btn:hover {
    background: #D32F2F;
    transform: scale(1.1);
}

.order-ingredients-hint {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 8px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-sm);
    font-size: 18px;
}

.no-order-message {
    text-align: center;
    padding: 20px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.no-order-message.hidden {
    display: none;
}

.recipe-list-container {
    padding: 12px;
    background: var(--color-surface-elevated);
    border-bottom: 1px solid var(--color-border-light);
}

.section-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.coffee-cup-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
    overflow-y: auto;
}

.cup-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ingredients-section {
    flex: 1;
}

.ingredients-section .section-label {
    text-align: center;
}

.make-actions {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
}

.make-actions .btn {
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

#user-level {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

#user-name {
    font-weight: 600;
    color: var(--color-text-primary);
}

.resources {
    display: flex;
    align-items: center;
    gap: 16px;
}

.resources span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
}

.resources .coin {
    color: #B8860B;
}

.resources .exp {
    color: var(--color-exp);
}

.game-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.scene {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #FFF8F0 0%, #F5E6D3 60%, #E8D4C4 100%);
    display: flex;
    flex-direction: column;
    position: relative;
}

.counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    background: linear-gradient(180deg, rgba(139, 90, 43, 0.1) 0%, transparent 100%);
}

.coffee-machine, .grinder {
    font-size: 48px;
    animation: pulse 2s ease-in-out infinite;
}

.grinder {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.customer-area {
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
}

.customer-queue {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 90%;
}

.customer {
    width: 60px;
    height: 80px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    animation: customerEnter 0.5s ease;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.customer:hover {
    transform: scale(1.05);
}

@keyframes customerEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.customer-avatar {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.customer-avatar svg {
    width: 100%;
    height: 100%;
}

.customer-patience {
    width: 80%;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.customer-patience .patience-bar {
    height: 100%;
    background: var(--color-success);
    transition: width var(--transition-normal), background var(--transition-normal);
}

.customer-patience .patience-bar.warning {
    background: var(--color-warning);
}

.customer-patience .patience-bar.danger {
    background: var(--color-error);
}

.work-area {
    padding: 16px;
}

.active-order {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.active-order.hidden {
    display: none;
}

.order-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-info .pixel-avatar {
    width: 22px;
    height: 22px;
}

#order-coffee-name {
    font-weight: 600;
    color: var(--color-primary);
}

.timer {
    margin-left: auto;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.timer.warning {
    color: var(--color-warning);
}

.timer.danger {
    color: var(--color-error);
}

.navigation {
    display: flex;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    padding: 8px 4px;
}

.nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-btn:hover {
    background: var(--color-surface-elevated);
    color: var(--color-text-secondary);
}

.nav-btn.active {
    color: var(--color-primary);
}

.nav-icon {
    font-size: 24px;
}

#make-screen, #upgrade-screen, #decorate-screen, #achievement-screen {
    background: var(--color-background);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.back-btn {
    background: transparent;
    border: none;
    font-size: 16px;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.back-btn:hover {
    background: var(--color-surface-elevated);
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.make-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.recipe-list {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.recipe-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: var(--color-surface-elevated);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.recipe-item:hover {
    background: #FFF0E0;
}

.recipe-item.selected {
    border-color: var(--color-primary);
    background: #FFF0E0;
}

.recipe-icon {
    font-size: 28px;
}

.recipe-name {
    font-size: 12px;
    color: var(--color-text-secondary);
    white-space: nowrap;
}

.make-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 16px;
}

.ingredients-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.ingredient {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.ingredient:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ingredient:active {
    transform: scale(0.95);
}

.ingredient-icon {
    font-size: 28px;
}

.ingredient-name {
    font-size: 11px;
    color: var(--color-text-secondary);
}

.coffee-cup-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.coffee-cup {
    position: relative;
    width: 120px;
    height: 140px;
}

.cup-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F5F5 100%);
    border-radius: 8px 8px 40px 40px;
    border: 4px solid #E0E0E0;
    box-shadow: inset 0 -20px 30px rgba(0, 0, 0, 0.05);
}

.cup-handle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-40%);
    width: 30px;
    height: 50px;
    border: 6px solid #E0E0E0;
    border-left: none;
    border-radius: 0 20px 20px 0;
}

.cup-contents {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    max-width: 100px;
}

.cup-content {
    font-size: 20px;
    animation: dropIn 0.3s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.make-actions {
    display: flex;
    gap: 12px;
}

.make-actions .btn {
    flex: 1;
}

.upgrade-tabs, .decorate-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    background: var(--color-surface-elevated);
}

.tab-btn.active {
    background: var(--color-primary);
    color: white;
}

.upgrade-content, .decorate-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.upgrade-panel, .decoration-panel {
    display: none;
}

.upgrade-panel.active, .decoration-panel.active {
    display: block;
}

.current-level {
    background: var(--color-surface);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 16px;
}

.current-level span:first-child {
    display: block;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

#shop-level-display {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
}

#upgrade-shop-btn {
    width: 100%;
}

.equipment-list, .employee-list, .achievement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equipment-item, .employee-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.item-icon {
    font-size: 40px;
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.item-level {
    font-size: 13px;
    color: var(--color-text-muted);
}

.item-bonus {
    font-size: 12px;
    color: var(--color-success);
}

.upgrade-item-btn {
    padding: 8px 16px;
    white-space: nowrap;
}

.achievement-stats {
    background: var(--color-surface);
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 16px;
    font-weight: 500;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.achievement-item.completed {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border: 2px solid var(--color-warning);
}

.achievement-item.locked {
    opacity: 0.6;
}

.achievement-icon {
    font-size: 40px;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.achievement-desc {
    font-size: 13px;
    color: var(--color-text-muted);
}

.achievement-reward {
    font-size: 12px;
    color: var(--color-warning);
    font-weight: 500;
}

.decoration-store {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.decoration-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.decoration-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.decoration-item.owned {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 2px solid var(--color-success);
}

.decoration-icon {
    font-size: 32px;
}

.decoration-name {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
}

.decoration-price {
    font-size: 11px;
    color: var(--color-warning);
    font-weight: 600;
}

.preview-area {
    background: linear-gradient(180deg, #FFF8F0 0%, #F5E6D3 100%);
    border-radius: var(--radius-md);
    min-height: 200px;
    padding: 16px;
    border: 2px dashed var(--color-border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

.preview-area .placed-item {
    font-size: 32px;
    cursor: move;
    transition: transform var(--transition-fast);
}

.preview-area .placed-item:hover {
    transform: scale(1.1);
}

.preview-actions {
    margin-top: 16px;
}

.preview-actions .btn {
    width: 100%;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 90%;
    max-width: 360px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

.modal-content h3 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--color-text-primary);
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.setting-item:last-of-type {
    border-bottom: none;
}

.setting-item span {
    color: var(--color-text-secondary);
}

.switch {
    position: relative;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-border);
    border-radius: 28px;
    transition: var(--transition-fast);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

input:checked + .slider {
    background: var(--color-primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.modal-content .btn {
    width: 100%;
    margin-top: 12px;
}

.modal-content .btn-danger {
    margin-top: 24px;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(62, 39, 35, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    z-index: 2000;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s;
}

.toast.hidden {
    display: none;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
}

.achievement-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FFD700 0%, #FFA000 100%);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(255, 160, 0, 0.4);
    z-index: 2000;
    animation: popIn 0.5s ease, popOut 0.5s ease 3s forwards;
}

.achievement-popup.hidden {
    display: none;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes popOut {
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

.popup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.popup-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.popup-title {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.popup-name {
    font-size: 16px;
    color: white;
    font-weight: 500;
}

@media (max-width: 380px) {
    .login-box {
        padding: 32px 24px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .counter {
        gap: 24px;
    }
    
    .coffee-machine, .grinder {
        font-size: 36px;
    }
    
    .recipe-item {
        padding: 10px 12px;
    }
    
    .recipe-icon {
        font-size: 24px;
    }
}

@media (min-height: 800px) {
    .game-area {
        max-height: calc(100vh - 160px);
    }
}

@media (max-height: 600px) {
    .login-box {
        padding: 24px;
    }
    
    .coffee-icon {
        font-size: 48px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .login-form {
        gap: 12px;
    }
    
    .btn {
        padding: 12px 20px;
    }
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}
