* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #050505 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto; /* ensure vertical scroll appears */
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    box-sizing: border-box;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    margin-bottom: 5px;
}

.tagline {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.login-btn {
    padding: 12px 30px;
    background: linear-gradient(45deg, #4ecdc4, #b9fffa);
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logout button */
.logout-btn {
    background: transparent;
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.6);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.12);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.25);
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 8px 10px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
    margin-top: 50px;
}

.search-bar:focus-within {
    border-color: rgba(78, 205, 196, 0.45);
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15), 0 12px 30px rgba(78,205,196,0.18);
    transform: translateY(-1px);
}

.search-input {
    flex: 1;
    min-width: 220px;
    background: transparent;
    border: none;
    outline: none;
    color: #e6f6f4;
    font-size: 14px;
    padding: 8px 6px 8px 10px;
    letter-spacing: 0.2px;
}

.search-input::placeholder {
    color: rgba(230, 246, 244, 0.45);
}

.search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    color: #0e1a1a;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    box-shadow: 0 6px 16px rgba(69,183,209,0.35);
    transition: transform 0.15s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(69,183,209,0.45);
    filter: brightness(1.05);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(69,183,209,0.35);
}

/* 小屏优化 */
@media (max-width: 640px) {
    .search-bar {
        gap: 8px;
        padding: 6px 8px;
        border-radius: 12px;
    }
    .search-input {
        min-width: 0;
        font-size: 13px;
        padding: 8px 4px 8px 8px;
    }
    .search-btn {
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }
}

.guest-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.guest-getvip-btn {
    background: transparent;
    color: #4ecdc4;
    border: 2px solid #4ecdc4;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guest-getvip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #4ecdc4;
    transition: left 0.3s ease;
    z-index: -1;
}

.guest-getvip-btn:hover::before {
    left: 0;
}

.guest-getvip-btn:hover {
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    animation: slideInRight 0.5s ease-out;
}

.user-avatar {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #ffffff !important;
}

.user-email {
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.svip-days-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #0e1a1a;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    box-shadow: 0 4px 12px rgba(69,183,209,0.35);
}

.getvip-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.getvip-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.getvip-btn:hover::before {
    left: 100%;
}

.getvip-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(255, 107, 107, 0.4);
    background: linear-gradient(45deg, #ff5252, #ff7043);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* Main Content */
.main-content {
    margin-top: 20px;
    margin-bottom: 100px;
    display: none; /* hidden by default */
    margin-bottom: 50px; /* add bottom spacing */
}

/* When AI output has content, show and style */
.main-content.content-has-output {
    display: block;
    background: rgba(0,0,0,0.10);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    margin-bottom: 100px;
}

/* Avoid double background: when container styled, keep inner output transparent */
.main-content.content-has-output .ai-output {
    background: transparent;
    border-color: transparent;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.game-card {
    background: linear-gradient(145deg, #0a0a0a, #151515);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #4ecdc4;
    box-shadow: 0 15px 35px rgba(78, 205, 196, 0.3);
}

.game-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.game-card:hover .game-cover {
    transform: scale(1.05);
}

.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-en-title {
    font-size: 0.9rem;
    color: #4ecdc4;
    margin-bottom: 12px;
    font-style: italic;
}

.game-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.download-count {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 0.85rem;
}



.game-version {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.dlc-badge {
    background: rgba(69, 183, 209, 0.2);
    color: #45b7d1;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Loading Styles */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 40px;
    color: #888;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(78, 205, 196, 0.3);
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-more {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Game Modal Styles */
.game-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(145deg, #0a0a0a, #151515);
    border-radius: 20px;
    padding: 30px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #4ecdc4;
    animation: modalSlideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.modal-header h2 {
    color: #4ecdc4;
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    background: none;
    border: none;
}

.modal-close:hover {
    color: #ff6b6b;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.modal-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#modal-cover {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

.modal-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
}

.screenshot {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.screenshot:hover {
    transform: scale(1.05);
}

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 280px;
    box-sizing: border-box;
}

.game-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    gap: 20px;
    width: 100%;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-label {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
    flex-shrink: 0;
    min-width: 80px;
}

.stat-value {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 1rem;
    text-align: left;
    flex-grow: 1;
}

/* Special styling for Hot stat */
.stat-item:first-child .stat-value {
    font-size: 1.2rem;
    filter: drop-shadow(0 0 6px rgba(255, 107, 107, 0.5));
}

.download-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* Nintendo Store Button - 任天堂红色主题 */
.nintendo-btn {
    background: linear-gradient(45deg, #e60012, #ff4444) !important;
    position: relative;
    overflow: hidden;
}

.nintendo-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nintendo-btn:hover::before {
    left: 100%;
}

.nintendo-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.5) !important;
}

/* eBay Button - eBay多彩主题 */
.ebay-btn {
    background: linear-gradient(45deg, #0064d2, #86b817, #f5af02, #dd1e31) !important;
    background-size: 400% 400%;
    animation: ebayGradient 3s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes ebayGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}



.ebay-btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(0, 100, 210, 0.4) !important;
    animation-duration: 1s;
}

/* Amazon Button - Amazon橙色主题 */
.amazon-btn {
    background: linear-gradient(45deg, #ff9900, #ffb84d) !important;
    position: relative;
    overflow: hidden;
}

.amazon-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #232f3e;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}



.amazon-btn:hover::before {
    transform: scaleX(1);
}

.amazon-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 153, 0, 0.5) !important;
    background: linear-gradient(45deg, #ffb84d, #ff9900) !important;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #9ecfcc;
    font-size: 13px;
}

/* Fixed footer behavior for index.html */
.footer.fixed-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.06);
    transform: translateY(0);
    opacity: 1;
    transition: transform .28s ease, opacity .25s ease;
}
.footer.fixed-footer.footer-hidden {
    transform: translateY(100%);
    opacity: 0;
}

/* Optional: reserve bottom space on small screens if needed */
/*
body.has-fixed-footer {
    padding-bottom: 64px;
}
*/
.footer-links {
    display: flex;
    gap: 18px;
}
.footer-link {
    color: #cfeeed;
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease, opacity .2s ease;
    opacity: .9;
}
.footer-link:hover {
    color: #4ecdc4;
    opacity: 1;
}

/* Info modal (Privacy / Contact) */
.contact-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}
.contact-email {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.1em;
    background: rgba(78, 205, 196, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 10px;
}

/* Info modal (Privacy / Contact) */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}
.info-modal-content {
    background: linear-gradient(145deg, #0a0a0a, #151515);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #4ecdc4;
    animation: modalSlideIn 0.3s ease;
}
.info-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}
.info-modal-header h2 {
    color: #4ecdc4;
    margin: 0;
    font-size: 1.5rem;
}
.info-modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    background: none;
    border: none;
}
.info-modal-close:hover {
    color: #ff6b6b;
}
.info-modal-body {
    line-height: 1.6;
    color: #ccc;
}
.info-modal-body h3 {
    color: #fff;
    margin-top: 20px;
    margin-bottom: 10px;
}
.info-modal-body p {
    margin-bottom: 15px;
}
.info-modal-body ul {
    margin-left: 20px;
    margin-bottom: 15px;
}
.info-modal-body li {
    margin-bottom: 5px;
}

@keyframes modalFadeIn {
    from { opacity: 0 } to { opacity: 1 }
}

/* Login Modal Styles */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.login-content {
    background: linear-gradient(145deg, #0a0a0a, #151515);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    border: 2px solid #4ecdc4;
    animation: modalSlideIn 0.3s ease;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

.login-header h2 {
    color: #4ecdc4;
    margin: 0;
}

.login-close {
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    background: none;
    border: none;
}

.login-close:hover {
    color: #ff6b6b;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4ecdc4;
    background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.login-footer {
    text-align: center;
}

.signup-link {
    color: #4ecdc4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.signup-link:hover {
    color: #45b7d1;
}

/* Register Modal Styles */
.register-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.register-content {
    background: linear-gradient(145deg, #0a0a0a, #151515);
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    border: 2px solid #4ecdc4;
    animation: modalSlideIn 0.3s ease;
}

.register-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
    padding-bottom: 20px;
}

.register-header h2 {
    color: #4ecdc4;
    margin: 0;
}

.register-close {
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.3s;
    background: none;
    border: none;
}

.register-close:hover {
    color: #ff6b6b;
}

.register-footer {
    text-align: center;
}

.signin-link {
    color: #4ecdc4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.signin-link:hover {
    color: #45b7d1;
}

/* Animations */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Responsive Footer */
@media (max-width: 768px) {
    .info-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .login-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* AI Search and Output */
.ai-search {
    gap: 12px;
    padding: 12px 12px;
    border-radius: 16px;
    margin-top: 50px;
}
.ai-search .search-input {
    font-size: 16px;
    padding: 14px 12px;
}
.send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    height: 44px;
    min-width: 88px;
    border-radius: 12px;
    border: 0;
    cursor: pointer;
    color: #0e1a1a;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    box-shadow: 0 6px 16px rgba(69,183,209,0.35);
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: transform .15s ease, box-shadow .25s ease, filter .25s ease, opacity .2s ease;
}
.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(69,183,209,0.45);
    filter: brightness(1.05);
}
.send-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 6px 16px rgba(69,183,209,0.35);
}

.ai-tips {
    margin-top: 10px;
    color: #9ecfcc;
    background: rgba(0,0,0,0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
}
.ai-tips ul {
    margin: 6px 0 0 18px;
}
.ai-tips li {
    margin: 4px 0;
}

/* AI Output Area */
#ai-output-section {
    /* margin-top: 28px; */
}
.ai-output {
    width: 100%;
    min-height: 220px;
    background: transparent; /* default transparent */
    border: 1px solid transparent; /* default hidden */
    border-radius: 14px;
    padding: 18px 16px;
    color: #e9fbf9;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    /* box-shadow: 0 10px 28px rgba(0,0,0,0.35); */
    position: relative;
    max-height: none;          /* use natural height; page scrolls */
    overflow-y: visible;       /* no inner scroll; outer page handles scroll */
}
/* Show background/border only when there is content */
.ai-output:not(:empty) {
    background: rgba(0,0,0,0.10);
    border-color: rgba(255,255,255,0.08);
}
.ai-output::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 1.2em;
    background: #4ecdc4;
    margin-left: 4px;
    vertical-align: -2px;
    animation: caretBlink 1s steps(1) infinite;
    opacity: .8;
}
/* Hide caret when empty */
.ai-output:empty::after {
    display: none;
}
@keyframes caretBlink {
    0%, 49% { opacity: .8; }
    50%, 100% { opacity: 0; }
}
.ai-error {
    color: #ff9a9a;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.25);
    padding: 10px 12px;
    border-radius: 10px;
}

/* Link styles inside AI output */
.ai-output a {
    color: #4ecdc4;
    text-decoration: none;
    text-underline-offset: 2px;
    transition: color .2s ease, text-shadow .2s ease;
    word-break: break-word;
    font-size: 11px;
    
}
.ai-output a:hover {
    color: #64e8e0;
    text-shadow: 0 0 8px rgba(78,205,196,0.35);
}
.ai-output a:active {
    color: #32b3ab;
}

/* Background Effects */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 200, 255, 0.3) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-20px) translateY(-10px);
    }
    50% {
        transform: translateX(20px) translateY(10px);
    }
    75% {
        transform: translateX(-10px) translateY(20px);
    }
}

/* Custom Scrollbar Styles - Dark Theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.8);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2a2a2a, #1a1a1a);
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3a3a3a, #2a2a2a);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(180deg, #4a4a4a, #3a3a3a);
}

::-webkit-scrollbar-corner {
    background: rgba(0, 0, 0, 0.8);
}

/* Firefox Scrollbar - Dark */
* {
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a rgba(0, 0, 0, 0.8);
}

/* Modal Scrollbar - Dark */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #333333, #222222);
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #444444, #333333);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}