/* 상사 피하기 게임 스타일 */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: 100vh;
    padding-bottom: calc(50px + 20px); /* 스크롤버튼 + 띠배너1번 + 띠배너여백 + 고정배너 + 여백 */
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-size: 42px;
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 182, 193, 0.5);
}

.game-subtitle {
    font-size: 18px;
    color: #5A5A5A;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 게임 설명 */
.game-instructions {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 182, 193, 0.3);
}

.instructions-content {
    max-width: 100%;
}

.instructions-title {
    font-size: 20px;
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 16px;
    text-align: center;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.instructions-list li {
    font-size: 15px;
    color: #5A5A5A;
    line-height: 1.6;
    padding: 8px 12px;
    background: rgba(255, 182, 193, 0.1);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-pink);
}

.instructions-list li strong {
    color: #2D2D2D;
    font-weight: 600;
}

/* 게임 정보 */
.game-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 182, 193, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 120px;
}

.info-label {
    font-size: 14px;
    color: #5A5A5A;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.info-value {
    font-size: 24px;
    font-weight: 700;
    color: #2D2D2D;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8);
}

/* 게임 영역 */
.game-area {
    background: white;
    border-radius: var(--radius-xl);
    padding: 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    width: 100%;
    height: calc(100vh - 500px);
    min-height: 400px;
    max-height: 600px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* 업무 화면 */
.work-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.work-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.work-content {
    text-align: center;
    color: #666;
}

.work-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.work-title {
    font-size: 32px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.work-text {
    font-size: 18px;
    color: #999;
}

/* 딴짓 화면 */
.fun-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.fun-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.fun-content {
    text-align: center;
    color: white;
}

.fun-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

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

.fun-title {
    font-size: 32px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.fun-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* 상사 경고 */
.boss-warning {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 193, 7, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 32px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(255, 193, 7, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 4;
    animation: pulse 1s infinite;
}

.boss-warning.active {
    opacity: 1;
}

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

.warning-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.warning-text {
    font-size: 18px;
    font-weight: 600;
    color: #2D2D2D;
}

/* 상사 */
.boss {
    position: absolute;
    top: 50%;
    right: -100px;
    transform: translateY(-50%);
    font-size: 60px;
    transition: right 3s linear;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
}

.boss.active {
    opacity: 1;
    right: calc(100% + 100px);
}

.boss-icon {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 게임 오버 모달 */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.game-over-modal.active {
    display: flex;
}

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

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 24px;
}

.modal-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f5f5f5;
    border-radius: var(--radius-md);
}

.stat-label {
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #2D2D2D;
}

.restart-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Pretendard', sans-serif;
}

.restart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 105, 180, 0.4);
}

.restart-btn:active {
    transform: translateY(0);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .game-container {
        padding: 30px 15px 70px;
    }

    .game-title {
        font-size: 32px;
    }

    .game-subtitle {
        font-size: 16px;
    }

    .game-instructions {
        padding: 20px 16px;
        margin-bottom: 20px;
    }

    .instructions-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .instructions-list {
        gap: 10px;
    }

    .instructions-list li {
        font-size: 14px;
        padding: 6px 10px;
    }

    .game-info {
        gap: 12px;
    }

    .info-item {
        padding: 10px 16px;
        min-width: 100px;
    }

    .info-label {
        font-size: 12px;
    }

    .info-value {
        font-size: 20px;
    }

    .game-area {
        height: calc(100vh - 450px);
        min-height: 300px;
        max-height: 500px;
    }

    .work-icon,
    .fun-icon {
        font-size: 60px;
    }

    .work-title,
    .fun-title {
        font-size: 24px;
    }

    .work-text,
    .fun-text {
        font-size: 16px;
    }

    .boss {
        font-size: 50px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .modal-icon {
        font-size: 60px;
    }

    .modal-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .game-area {
        height: calc(100vh - 500px);
        min-height: 250px;
        max-height: 400px;
    }

    .instructions-list li {
        font-size: 13px;
    }
}

/* 세로 모드 최적화 */
@media (orientation: portrait) and (max-height: 800px) {
    .game-area {
        height: calc(100vh - 480px);
        min-height: 250px;
        max-height: 350px;
    }
}

/* 가로 모드 최적화 */
@media (orientation: landscape) and (max-width: 1024px) {
    .game-area {
        height: calc(100vh - 400px);
        min-height: 300px;
        max-height: 500px;
    }
}
