@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Orbitron:wght@400;700;900&family=DotGothic16&display=swap');

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

/* 예시 문장 선택 방지 */
.sentence-display {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'DotGothic16', 'Press Start 2P', 'Courier New', monospace;
    background: url('images/bg.png') repeat;
    background-attachment: fixed;
    min-height: 100vh;
    color: #ffffff;
    padding-bottom: 80px;
    position: relative;
    overflow-x: hidden;
}



.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.page {
    display: none;
    animation: slideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page.active {
    display: block;
}

@keyframes slideIn {
    0% { 
        opacity: 0; 
        transform: translateX(-100px);
        filter: brightness(0.5);
    }
    50% {
        transform: translateX(10px);
        filter: brightness(1.2);
    }
    100% { 
        opacity: 1; 
        transform: translateX(0);
        filter: brightness(1);
    }
}

.card {
    background: #fffef0;
    border: 3px solid #000000;
    border-radius: 8px;
    padding: 32px;
    margin: 20px auto;
    max-width: 600px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, #003592 0%, #0047a8 100%);
    border-radius: 5px 5px 0 0;
    border-bottom: 1px solid #000000;
}

.card::after {
    content: '⚫ ⚫ ⚫';
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 8px;
    color: #ffffff;
    letter-spacing: 4px;
    pointer-events: none;
    z-index: 1;
}

h1 {
    text-align: center;
    color: #003592;
    margin-bottom: 32px;
    margin-top: 35px;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    position: relative;
    z-index: 2;
    line-height: 1.4;
    image-rendering: pixelated;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 8px;
    background: 
        repeating-linear-gradient(90deg, 
            #fccb37 0px, #fccb37 8px,
            #e61e87 8px, #e61e87 16px,
            #003592 16px, #003592 24px);
    border: 2px solid #ffffff;
}

h2 {
    color: #003592;
    margin-bottom: 20px;
    margin-top: 40px;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    image-rendering: pixelated;
    position: relative;
    z-index: 2;
}

.my-record h2 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 0.9rem;
    opacity: 0;
}

h3 {
    color: #fccb37;
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 0px #003592;
    image-rendering: pixelated;
}

.hero-icon {
    text-align: center;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

.hero-icon::after {
    content: '🎮';
    font-size: 3rem;
    display: block;
    animation: gentleFloat 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    25% { transform: translateY(-8px) scale(1.1); }
    50% { transform: translateY(-12px) scale(1.05); }
    75% { transform: translateY(-8px) scale(1.1); }
}

.subtitle {
    text-align: center;
    color: #ffffff;
    font-size: 0.7rem;
    margin-bottom: 32px;
    font-weight: 400;
    line-height: 1.8;
    text-shadow: 1px 1px 0px #003592;
    letter-spacing: 1px;
    image-rendering: pixelated;
}

.form-group {
    margin-bottom: 28px;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #003592;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
}

label svg {
    opacity: 0.7;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #003592;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.1s ease;
    background: #fffef0;
    color: #003592;
    position: relative;
    z-index: 1;
    box-shadow: 
        inset 1px 1px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.8);
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
    letter-spacing: 1px;
}

input[type="text"]::placeholder, input[type="password"]::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

input[type="text"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: #38bdf8;
    background: #fffef0;
    box-shadow: 
        2px 2px 4px rgba(56, 189, 248, 0.3),
        inset 1px 1px 0px rgba(0, 0, 0, 0.1),
        inset -1px -1px 0px rgba(255, 255, 255, 0.9);
    transform: translate(-1px, -1px);
    color: #003592;
}

.btn {
    background: #38bdf8;
    color: #003592;
    border: 2px solid #003592;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.6),
        inset -1px -1px 0px rgba(0, 0, 0, 0.1);
    letter-spacing: 1px;
    z-index: 1;
    min-width: 120px;
    text-transform: uppercase;
    image-rendering: pixelated;
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
    transform-origin: center;
}

@keyframes buttonPress {
    0% { transform: translate(0, 0) scale(1.05); }
    50% { transform: translate(2px, 2px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1.05); }
}

.btn::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: 
        repeating-linear-gradient(45deg, 
            transparent 0px, transparent 2px,
            rgba(255, 255, 255, 0.1) 2px, rgba(255, 255, 255, 0.1) 4px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    border-radius: 4px;
}

.btn:hover {
    transform: scale(1.05);
    background: #fbbf24;
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translate(2px, 2px) scale(1.05);
    box-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.3),
        inset 2px 2px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.4);
    animation: buttonPress 0.15s ease-out;
}

.btn-primary {
    background: #38bdf8;
}

.btn-danger {
    background: #38bdf8;
    color: #dc2626;
    border: 2px solid #dc2626;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.6),
        inset -1px -1px 0px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    transform: scale(1.05);
    background: #fbbf24;
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: #38bdf8;
    color: #047857;
    border: 2px solid #047857;
    box-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.6),
        inset -1px -1px 0px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    transform: scale(1.05);
    background: #fbbf24;
    box-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.3),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
}

/* 게임 페이지 스타일 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fffef0;
    border: 3px solid #000000;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 20px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.level-indicator {
    font-size: 1.2rem;
    font-weight: 400;
    color: #003592;
    letter-spacing: 2px;
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
}

.accuracy-display {
    font-size: 0.8rem;
    font-weight: 400;
    color: #003592;
    padding: 8px 12px;
    background: #fffef0;
    border-radius: 4px;
    border: 1px solid #000000;
    box-shadow: 
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
    letter-spacing: 1px;
}

.game-content {
    background: #fffef0;
    border: 3px solid #000000;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.game-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 0%, rgba(139, 92, 246, 0.05), transparent 50%);
    pointer-events: none;
}

.sample-text {
    margin-bottom: 30px;
}

.sentence-display {
    background: #fffef0;
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 20px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #003592;
    font-family: 'DotGothic16', 'Press Start 2P', 'Courier New', monospace;
    font-weight: 400;
    letter-spacing: 1px;
    box-shadow: 
        inset 1px 1px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
}

.input-section {
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.typing-input {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #000000;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.6;
    resize: vertical;
    font-family: 'DotGothic16', 'Press Start 2P', 'Courier New', monospace;
    font-weight: 400;
    background: #fffef0;
    color: #003592;
    letter-spacing: 1px;
    transition: all 0.1s ease;
    box-shadow: 
        inset 1px 1px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.8);
    cursor: pointer;
    user-select: none;
}

.typing-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.typing-input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.15),
        0 16px 40px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    font-weight: 600;
}

.timer {
    color: #667eea;
    font-size: 1.2rem;
}

.progress {
    color: #4a5568;
    font-size: 1.1rem;
}

/* 완료 페이지 스타일 */
.completion-card {
    text-align: center;
    max-width: 500px;
}

.result-info {
    margin: 30px 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.125rem;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item .label {
    font-weight: 600;
    color: #003592;
}

.result-item .value {
    font-weight: 700;
    color: #6366f1;
}

/* 리더보드 페이지 스타일 */
.leaderboard-container {
    background: #fffef0;
    border: 3px solid #000000;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.leaderboard-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, #003592 0%, #0047a8 100%);
    border-radius: 5px 5px 0 0;
    border-bottom: 1px solid #000000;
}

.leaderboard-container::after {
    content: '⚫ ⚫ ⚫';
    position: absolute;
    top: 8px;
    left: 12px;
    font-size: 8px;
    color: #ffffff;
    letter-spacing: 4px;
    pointer-events: none;
    z-index: 1;
}

.top-rankings {
    margin-bottom: 32px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fffef0;
    border: 1px solid #000000;
    border-radius: 4px;
    transition: all 0.1s ease;
    font-weight: 400;
    color: #003592;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    margin: 4px 0;
}

.ranking-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #e61e87;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.ranking-item:hover {
    background: rgba(252, 203, 55, 0.2);
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px rgba(252, 203, 55, 0.8);
}

.ranking-item:hover::before {
    opacity: 1;
}

.rank-1 {
    background: linear-gradient(135deg, rgba(230, 30, 135, 0.2) 0%, rgba(230, 30, 135, 0.1) 100%);
    border: 2px solid rgba(230, 30, 135, 0.5);
    color: #e61e87;
    font-weight: 800;
    font-size: 1.1rem;
    transform: scale(1.05);
    box-shadow: 
        0 20px 40px rgba(230, 30, 135, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(230, 30, 135, 0.6);
    position: relative;
}

.rank-1::before {
    background: linear-gradient(135deg, #e61e87, #d1477a);
    opacity: 1;
    width: 6px;
}

.rank-1::after {
    content: '👑';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.rank-2 {
    background: linear-gradient(135deg, rgba(0, 53, 146, 0.2) 0%, rgba(0, 53, 146, 0.1) 100%);
    border: 2px solid rgba(0, 53, 146, 0.5);
    color: #003592;
    font-weight: 700;
    font-size: 1.05rem;
    transform: scale(1.03);
    box-shadow: 
        0 16px 32px rgba(0, 53, 146, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 15px rgba(0, 53, 146, 0.4);
    position: relative;
}

.rank-2::before {
    background: linear-gradient(135deg, #003592, #1e40af);
    opacity: 1;
    width: 5px;
}

.rank-2::after {
    content: '🥈';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
}

.rank-3 {
    background: linear-gradient(135deg, rgba(252, 203, 55, 0.3) 0%, rgba(252, 203, 55, 0.15) 100%);
    border: 2px solid #fccb37;
    color: #fccb37;
    font-weight: 700;
    font-size: 1.02rem;
    transform: scale(1.01);
    box-shadow: 
        0 14px 28px rgba(252, 203, 55, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 0 10px rgba(252, 203, 55, 0.3);
    position: relative;
}

.rank-3::before {
    background: linear-gradient(135deg, #fccb37, #f59e0b);
    opacity: 1;
    width: 4px;
}

.rank-3::after {
    content: '🥉';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.rank {
    font-weight: 400;
    min-width: 60px;
    color: #003592;
}

.name {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    color: #003592;
}

.time {
    font-weight: 400;
    color: #e61e87;
    min-width: 60px;
    text-align: right;
}

.my-record {
    margin-bottom: 24px;
    padding: 20px;
    background: #fffef0;
    border: 2px solid #000000;
    border-radius: 8px;
    box-shadow: 
        4px 4px 8px rgba(0, 0, 0, 0.2),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.my-record::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, #e61e87 0%, #c7185f 100%);
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #000000;
}

.my-record::after {
    content: '📊 내 기록';
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 0.6rem;
    color: #ffffff;
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 1;
}

.record-comparison {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.record-comparison .record-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: 
        repeating-linear-gradient(to right,
            #003592 0px, #003592 3px,
            transparent 3px, transparent 6px);
    opacity: 0.3;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    padding: 8px 0;
}

.record-item .label {
    color: #003592;
    font-weight: 400;
}

.record-item .value {
    color: #e61e87;
    font-weight: 700;
}

/* 관리자 페이지 스타일 */
.admin-section {
    margin-bottom: 30px;
}

.hidden {
    display: none;
}

.admin-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-stats {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item .label {
    color: #003592;
    font-weight: 600;
}

.stat-item .value {
    color: #6366f1;
    font-weight: 700;
}

/* 하단 네비게이션 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 35, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    box-shadow: 0 -16px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.nav-logo {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.nav-logo-image {
    width: 144px;
    height: auto;
    border-radius: 4px;
    opacity: 1;
    transition: all 0.3s ease;
}

.nav-logo-image:hover {
    opacity: 1;
    transform: scale(1.1);
}

.nav-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    max-width: 120px;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 8px 32px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-btn:hover:not(.active)::before {
    opacity: 1;
}

.nav-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 25px;
        margin: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .game-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .game-content {
        padding: 20px;
    }
    
    .sentence-display {
        padding: 20px;
        font-size: 1.1rem;
    }
    
    .typing-input {
        min-height: 120px;
        padding: 15px;
        font-size: 1rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .ranking-item {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .name {
        font-size: 1rem;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions .btn {
        width: 100%;
    }
    
    .bottom-nav {
        padding: 10px;
    }
    
    .nav-logo {
        left: 10px;
    }
    
    .nav-logo-image {
        width: 114px;
    }
    
    .nav-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
        margin: 5px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .sentence-display {
        font-size: 1rem;
        padding: 15px;
    }
    
    .typing-input {
        min-height: 100px;
        padding: 12px;
    }
    
    .ranking-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .result-item, .record-item, .stat-item {
        font-size: 1rem;
    }
}

/* 8비트 스타일 애니메이션 효과 */
@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.05);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    20% { transform: translateX(8px); }
    30% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    50% { transform: translateX(-4px); }
    60% { transform: translateX(4px); }
    70% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
    90% { transform: translateX(-1px); }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 
            4px 4px 0px #003592,
            8px 8px 0px #e61e87;
    }
    50% {
        box-shadow: 
            6px 6px 0px #003592,
            12px 12px 0px #e61e87,
            0 0 20px #fccb37;
    }
}

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

.btn-primary:focus {
    animation: glow 2s infinite;
}

.typing-input.error {
    animation: shake 0.5s ease-in-out;
    border-color: rgba(239, 68, 68, 0.5) !important;
    box-shadow: 
        0 0 0 4px rgba(239, 68, 68, 0.15),
        0 16px 40px rgba(239, 68, 68, 0.2);
}

.accuracy-display.perfect {
    animation: pulse 2s infinite;
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

/* 개인정보 동의 모달 스타일 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    background: #fffef0;
    border: 3px solid #000000;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        8px 8px 16px rgba(0, 0, 0, 0.4),
        inset 1px 1px 0px rgba(255, 255, 255, 0.8),
        inset -1px -1px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, #003592 0%, #0047a8 100%);
    border-radius: 5px 5px 0 0;
    border-bottom: 1px solid #000000;
}

.modal-container::after {
    content: '🔒 개인정보 동의';
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 0.6rem;
    color: #ffffff;
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 1;
}

.modal-content {
    padding: 40px 32px 32px 32px;
    position: relative;
    z-index: 2;
}

.modal-content h2 {
    color: #003592;
    margin-bottom: 24px;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-align: center;
    image-rendering: pixelated;
}

.privacy-content {
    margin-bottom: 24px;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #000000;
    border-radius: 4px;
    padding: 16px;
    background: #fffef0;
    box-shadow: 
        inset 1px 1px 0px rgba(0, 0, 0, 0.2),
        inset -1px -1px 0px rgba(255, 255, 255, 0.8);
}

.privacy-item {
    margin-bottom: 16px;
    font-size: 0.7rem;
    line-height: 1.6;
    color: #003592;
    font-family: 'DotGothic16', 'Press Start 2P', monospace;
}

.privacy-item:last-child {
    margin-bottom: 0;
}

.privacy-item strong {
    color: #e61e87;
    display: block;
    margin-bottom: 8px;
}

.privacy-item ul {
    margin: 8px 0 0 16px;
    padding: 0;
}

.privacy-item li {
    margin-bottom: 4px;
    list-style-type: none;
    position: relative;
}

.privacy-item li::before {
    content: '•';
    color: #fccb37;
    font-weight: bold;
    position: absolute;
    left: -12px;
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.modal-buttons .btn {
    min-width: 200px;
    padding: 16px 24px;
    font-size: 0.7rem;
}

/* 비활성화된 입력 필드 스타일 */
input[type="text"]:disabled, 
input[type="password"]:disabled,
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #e5e7eb;
    color: #9ca3af;
    border-color: #d1d5db;
}

.btn:disabled {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* 모달 애니메이션 */
@keyframes fadeIn {
    0% { 
        opacity: 0; 
    }
    100% { 
        opacity: 1; 
    }
}

@keyframes modalSlideIn {
    0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(-50px);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

/* 텍스트 선택 스타일 */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #f8fafc;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: #f8fafc;
}

/* 로딩 스피너 (필요시 사용) */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}