/* Panana - Mobile-Optimized Game Page */

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: #F8FAFC;
    min-height: 100vh;
    color: #1E293B;
    padding-top: 60px; /* Space for fixed header */
    display: flex;
    flex-direction: column;
}

/* Top Header Bar */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid #E2E8F0;
    padding: 16px 20px;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-brand {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: left;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    cursor: pointer;
}

.header-brand:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.header-brand:active {
    transform: translateY(0);
}

.brand-green {
    color: #10B981;
}

.brand-purple {
    color: #7C3AED;
}

/* Responsive sizing */
@media (min-width: 768px) {
    body {
        padding-top: 80px; /* Larger header on desktop */
    }

    .top-header {
        padding: 20px 40px;
    }

    .header-brand {
        font-size: 32px;
    }
}

@media (min-width: 1024px) {
    .header-brand {
        font-size: 36px;
    }
}

.container {
    padding: 20px;
    max-width: 100%;
}

/* Game Card - Matches mobile PlainCard */
.game-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 20px;
    border: 0.5px solid #E2E8F0;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Badge Styles */
.badge {
    display: block;
    width: fit-content;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: 0;
}

.happening-badge {
    background-color: rgba(16, 185, 129, 0.2);
    color: #10B981;
}

.ended-badge {
    background-color: rgba(100, 116, 139, 0.2);
    color: #64748B;
}

/* Typography - Larger for better readability on web */
.game-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
    color: #1E293B;
    margin-bottom: 12px;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.detail-icon {
    font-size: 18px;
    color: #64748B;
    width: 18px;
    flex-shrink: 0;
}

.detail-text {
    font-size: 16px;
    color: #64748B;
    flex: 1;
    line-height: 24px;
}

.message-spacing {
    height: 20px;
}

.invite-message {
    font-size: 16px;
    line-height: 24px;
    color: #64748B;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.primary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
}

.primary-button:active {
    transform: translateY(1px);
}

.secondary-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    border-radius: 16px;
    background: #F1F5F9;
    border: none;
    color: #64748B;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
}

.secondary-button:active {
    background: #E2E8F0;
}

/* Download Section */
.download-section {
    margin-top: 32px;
    text-align: center;
}

.download-title {
    font-size: 18px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 16px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    background: #7C3AED;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.download-button:hover {
    background: #8B5CF6;
    box-shadow: 0 6px 30px rgba(124, 58, 237, 0.4);
    transform: translateY(-1px);
}

.download-button:active {
    background: #7C3AED;
    transform: translateY(0);
}

.button-icon {
    font-size: 26px;
}

/* Divider */
.divider {
    text-align: center;
    margin: 24px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #E2E8F0;
}

.divider span {
    position: relative;
    background: #F8FAFC;
    padding: 0 16px;
    color: #94A3B8;
    font-size: 14px;
}

/* Larger text on bigger screens */
@media (min-width: 768px) {
    .game-title {
        font-size: 24px;
        line-height: 32px;
    }

    .detail-text {
        font-size: 18px;
        line-height: 26px;
    }

    .detail-icon {
        font-size: 20px;
        width: 20px;
    }

    .invite-message {
        font-size: 18px;
        line-height: 28px;
    }

    .game-card {
        padding: 24px;
    }
}

/* ========================================
   404 Not Found Page Styles
   ======================================== */
body.not-found-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.not-found-page .container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    padding-top: 80px;
}

.not-found-container {
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
}

.not-found-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.not-found-title {
    font-size: 28px;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
}

.not-found-subtitle {
    font-size: 18px;
    color: #64748B;
    line-height: 26px;
    margin-bottom: 40px;
}

/* ========================================
   Footer Styles
   ======================================== */
footer {
    background: #FFFFFF;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #E2E8F0;
    margin-top: auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #64748B;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #7C3AED;
}

.copyright {
    font-size: 14px;
    color: #94A3B8;
}

/* ========================================
   Dark Mode Support
   ======================================== */
@media (prefers-color-scheme: dark) {
    body {
        background: #0F172A;
        color: #F8FAFC;
    }

    /* Header */
    .top-header {
        background: #1E293B;
        border-bottom-color: #334155;
    }

    /* Game Card */
    .game-card {
        background: #1E293B;
        border-color: #334155;
    }

    .game-title {
        color: #F8FAFC;
    }

    .detail-icon,
    .detail-text {
        color: #CBD5E1;
    }

    .invite-message {
        color: #CBD5E1;
    }

    /* Secondary Button - Match mobile app style */
    .secondary-button {
        background: #334155;
        color: #CBD5E1;
    }

    .secondary-button:active {
        background: #475569;
    }

    /* Download Section */
    .download-title {
        color: #F8FAFC;
    }

    .download-button {
        background: #1E293B;
        color: #E2E8F0;
        border-color: #334155;
    }

    .download-button:hover {
        background: #334155;
    }

    .download-button:active {
        background: #475569;
    }

    /* Divider */
    .divider::before {
        background: #334155;
    }

    .divider span {
        background: #0F172A;
        color: #64748B;
    }

    /* Footer */
    footer {
        background: #1E293B;
        border-top-color: #334155;
    }

    .footer-links a {
        color: #CBD5E1;
    }

    .footer-links a:hover {
        color: #8B5CF6;
    }

    .copyright {
        color: #64748B;
    }

    /* 404 Not Found Page */
    .not-found-title {
        color: #F8FAFC;
    }

    .not-found-subtitle {
        color: #CBD5E1;
    }

    /* Badge styles for dark mode */
    .happening-badge {
        background-color: rgba(16, 185, 129, 0.3);
        color: #10B981;
    }

    .ended-badge {
        background-color: rgba(148, 163, 184, 0.3);
        color: #94A3B8;
    }
}
