/* === CSS Variables === */
:root {
    --primary: #7C4DFF;
    --primary-dark: #651FFF;
    --primary-light: #B39DDB;
    --secondary: #9575CD;
    --success: #4CAF50;
    --warning: #FFC107;
    --gold: #FFD700;

    --text-dark: #2D3436;
    --text-light: #636E72;
    --white: #FFFFFF;
    --bg-light: #F8F9FA;

    --shadow-sm: 0 2px 8px rgba(124, 77, 255, 0.1);
    --shadow-md: 0 4px 20px rgba(124, 77, 255, 0.15);
    --shadow-lg: 0 8px 40px rgba(124, 77, 255, 0.2);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    min-height: 100vh;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* === Event Ended Section === */
.event-ended {
    display: none;
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    width: 100%;
    max-width: 1200px;
}

.event-ended.active {
    display: block;
}

.ended-content {
    max-width: 500px;
    margin: 0 auto;
}

.ended-emoji {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

.event-ended h1 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 20px;
}

.ended-message {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    line-height: 1.6;
}

.ended-message strong {
    color: var(--gold);
}

.ended-period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 25px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: inline-block;
}

.ended-next {
    font-size: 1.3rem;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 30px;
}

.btn-visit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-visit:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* === Hero Section === */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid rgba(124, 77, 255, 0.1);
    width: 100%;
    max-width: 1200px;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.egg-emoji {
    display: inline-block;
    animation: bounce 1s ease infinite;
}

.egg-emoji:last-child {
    animation-delay: 0.5s;
}

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

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.btn-start {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 20px 50px;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-family: inherit;
}

.btn-start:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.hero-info {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--text-light);
}

.info-icon {
    font-size: 1.5rem;
}

/* === Leaderboard === */
.leaderboard-section {
    display: none;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(124, 77, 255, 0.1);
}

.leaderboard-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.leaderboard-item {
    display: grid;
    grid-template-columns: 40px 1fr 1fr 80px;
    gap: 10px;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(124, 77, 255, 0.1));
    border-radius: var(--radius-md);
    font-size: 0.95rem;
}

.lb-rank {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.lb-name {
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
}

.lb-location {
    color: var(--text-light);
    font-size: 0.85rem;
    text-align: left;
}

.lb-time {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

/* === Game Section === */
.game-section {
    display: none;
    padding: 30px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
    border: 1px solid rgba(124, 77, 255, 0.1);
    width: 100%;
    max-width: 1200px;
}

.game-section.active {
    display: block;
}

.game-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.game-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* === Sidebar Leaderboard === */
.game-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-leaderboard {
    background: linear-gradient(135deg, rgba(124, 77, 255, 0.05), rgba(124, 77, 255, 0.1));
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid rgba(124, 77, 255, 0.1);
}

.sidebar-title {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
}

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.sidebar-item {
    display: grid;
    grid-template-columns: 30px 1fr 60px;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: var(--white);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: transform 0.2s;
}

.sidebar-item:hover {
    transform: translateX(3px);
}

.sidebar-rank {
    font-weight: 700;
    text-align: center;
}

.sidebar-info {
    overflow: hidden;
}

.sidebar-name {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-location {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-time {
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.sidebar-empty {
    text-align: center;
    color: var(--text-light);
    padding: 30px 10px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* === Progress Container === */
.progress-container {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.egg-gauge {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.gauge-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.egg-slots {
    display: flex;
    gap: 10px;
}

.egg-slot {
    width: 45px;
    height: 55px;
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s ease;
    border: 2px dashed #ccc;
}

.egg-slot.filled {
    background: linear-gradient(180deg, var(--gold) 0%, #FFA000 100%);
    border: 2px solid var(--gold);
    animation: eggPop 0.5s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.egg-slot.filled::after {
    content: '🥚';
    font-size: 1.6rem;
}

@keyframes eggPop {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-label {
    color: var(--text-light);
    font-size: 1rem;
}

.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.stat-value.timer {
    font-family: 'Courier New', monospace;
    min-width: 80px;
}

/* === Game Grid === */
.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto 30px auto;
}

/* === Card Styles === */
.card {
    aspect-ratio: 3/4;
    perspective: 1000px;
    cursor: pointer;
    min-height: 180px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card.matched .card-inner {
    transform: rotateY(180deg);
}

.card.matched {
    cursor: pointer;
}

.card.matched:hover {
    transform: scale(1.02);
    z-index: 5;
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Card Back - Purple SpaceCloud Design */
.card-back {
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card-back-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.easter-egg {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.sc-text {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Card Front - Vertical Layout */
.card-front {
    background: var(--white);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
}

.card-image {
    width: 100%;
    height: 65%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.card-info {
    width: 100%;
    height: 35%;
    padding: 8px;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
    word-break: keep-all;
}

.card-details {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.card-location {
    font-size: 0.65rem;
    color: var(--text-light);
}

.card-type {
    font-size: 0.6rem;
    background: var(--gold);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    font-weight: 500;
}

.card-link-hint {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(124, 77, 255, 0.95), rgba(124, 77, 255, 0.7), transparent);
    color: white;
    text-align: center;
    padding: 20px 10px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulseHint 1.5s ease-in-out infinite;
}

@keyframes pulseHint {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.card.matched .card-link-hint {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Matched Card Effect */
.card.matched .card-front {
    border: 3px solid var(--success);
}

.card.matched::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--success);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: bold;
    z-index: 10;
}

/* === Game Buttons === */
.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-restart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 14px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-restart:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--white);
    color: var(--success);
    border: 2px solid var(--success);
    padding: 14px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-copy-link:hover {
    background: var(--success);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--text-dark);
    border: 2px solid var(--gold);
    padding: 14px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-share:hover {
    background: #FFA000;
    border-color: #FFA000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* === Modals === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 50px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: modalPop 0.4s ease;
}

@keyframes modalPop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-body {
    position: relative;
    z-index: 1;
}

/* === Result Modal === */
.result-content {
    background: var(--white);
}

.result-trophy {
    font-size: 4rem;
    margin-bottom: 15px;
}

.result-content h2 {
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 25px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.result-stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.result-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.result-message {
    color: var(--text-light);
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.input-group input {
    padding: 14px 20px;
    font-size: 1rem;
    border: 2px solid #eee;
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-group input::placeholder {
    color: #aaa;
}

.result-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.btn-skip {
    background: transparent;
    color: var(--text-light);
    border: 2px solid #ddd;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-skip:hover {
    border-color: var(--text-light);
}

.btn-next-round {
    background: linear-gradient(135deg, var(--success), #388E3C);
    color: var(--white);
    border: none;
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

/* === Coupon Modal === */
.coupon-content {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 60px 40px;
}

.golden-egg {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: goldenGlow 1.5s ease infinite alternate;
}

@keyframes goldenGlow {
    0% { filter: drop-shadow(0 0 10px gold); }
    100% { filter: drop-shadow(0 0 30px gold); }
}

.coupon-modal h2 {
    color: var(--white);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.coupon-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 10px;
}

.coupon-subtitle {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.coupon-code-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.coupon-code {
    background: var(--white);
    padding: 18px 35px;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 4px;
    border-radius: var(--radius-md);
    color: var(--primary);
    border: 3px dashed var(--primary-light);
}

.btn-copy {
    background: var(--gold);
    color: var(--text-dark);
    border: none;
    padding: 18px 25px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-copy:hover {
    background: #FFA000;
    transform: scale(1.05);
}

.btn-copy.copied {
    background: var(--success);
    color: white;
}

.coupon-instruction {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 30px;
}

.coupon-instruction a {
    color: var(--gold);
    font-weight: 600;
    text-decoration: none;
}

.coupon-instruction a:hover {
    text-decoration: underline;
}

.coupon-instruction-kr {
    color: var(--white);
    font-size: 0.95rem;
    margin-bottom: 25px;
    font-weight: 500;
}

.btn-close-coupon {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid var(--white);
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-close-coupon:hover {
    background: var(--white);
    color: var(--primary);
}

/* === Already Won Banner === */
.already-won-banner {
    display: none;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    padding: 15px 25px;
    border-radius: var(--radius-md);
    text-align: center;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 1200px;
}

.already-won-banner.show {
    display: block;
}

/* === Completion Toast === */
.completion-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-dark);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.completion-toast.show {
    transform: translateX(-50%) translateY(0);
}

/* === Footer === */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-light);
    margin-top: auto;
    width: 100%;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* === Confetti Animation === */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-100%) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(500px) rotate(720deg);
    }
}

/* === Responsive Design === */
@media (max-width: 900px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
        gap: 10px;
    }

    .card {
        min-height: 160px;
    }

    .card-name {
        font-size: 0.75rem;
    }

    .card-info {
        padding: 6px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .btn-start {
        padding: 16px 35px;
        font-size: 1.2rem;
    }

    .hero-info {
        gap: 25px;
    }

    .info-item {
        font-size: 0.95rem;
    }

    .game-section {
        padding: 15px 10px;
    }

    .game-layout {
        flex-direction: column;
    }

    .game-sidebar {
        width: 100%;
        order: 2;
        margin-top: 20px;
    }

    .sidebar-list {
        max-height: 200px;
    }

    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        max-width: 100%;
        margin-bottom: 15px;
    }

    .card {
        min-height: 115px;
        aspect-ratio: 3/4;
    }

    .egg-gauge {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 10px;
    }

    .egg-slot {
        width: 32px;
        height: 40px;
    }

    .egg-slot.filled::after {
        font-size: 1.1rem;
    }

    .game-stats {
        gap: 20px;
    }

    .easter-egg {
        font-size: 2rem;
    }

    .sc-text {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }

    .card-image {
        height: 60%;
    }

    .card-info {
        height: 40%;
        padding: 6px;
    }

    .card-name {
        font-size: 0.7rem;
        -webkit-line-clamp: 2;
    }

    .card-location {
        font-size: 0.55rem;
    }

    .card-type {
        font-size: 0.5rem;
        padding: 2px 5px;
    }

    .modal-content {
        padding: 35px 25px;
    }

    .coupon-content {
        padding: 40px 25px;
    }

    .coupon-code {
        font-size: 1.5rem;
        padding: 15px 25px;
        letter-spacing: 3px;
    }

    .golden-egg {
        font-size: 4rem;
    }

    .coupon-modal h2 {
        font-size: 1.8rem;
    }

    .leaderboard-item {
        grid-template-columns: 35px 1fr 80px;
        font-size: 0.85rem;
        padding: 10px 15px;
    }

    .lb-location {
        display: none;
    }

    .result-stats {
        gap: 25px;
    }

    .result-stat-value {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
    }

    .card {
        min-height: 100px;
        aspect-ratio: 3/4;
    }

    .card-image {
        height: 55%;
    }

    .card-info {
        height: 45%;
        padding: 4px;
    }

    .card-name {
        font-size: 0.6rem;
        margin-bottom: 2px;
        -webkit-line-clamp: 2;
    }

    .card-location {
        font-size: 0.5rem;
    }

    .card-type {
        display: none;
    }

    .coupon-code-container {
        flex-direction: column;
    }

    .coupon-code {
        font-size: 1.3rem;
        width: 100%;
    }

    .btn-copy {
        width: 100%;
    }

    .result-buttons {
        flex-direction: column;
    }

    .btn-submit, .btn-skip, .btn-next-round {
        width: 100%;
    }
}

/* === Shake Animation for Wrong Match === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.card.wrong .card-inner {
    animation: shake 0.3s ease;
}

/* Card Hover Effect */
.card:not(.flipped):not(.matched):hover .card-inner {
    transform: scale(1.03);
}

.card:not(.flipped):not(.matched):hover {
    z-index: 1;
}
