/* GNSDK Social Light Theme 2026
   Focus: Friendliness, Clarity, and Fun
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;800&display=swap');

:root {
    /* Playful Palette */
    --bg-page: #f8fafc;         /* Soft white/blue */
    --bg-card: #ffffff;
    --primary: #6366f1;         /* Friendly Indigo */
    --primary-light: #e0e7ff;
    --accent: #fbbf24;          /* Playful Yellow */
    --text-main: #1e293b;       /* Soft Slate */
    --text-muted: #64748b;
    --success: #22c55e;
    --gnsdk-red: #FF3535;       /* GNSDK Brand Red */
    
    /* Soft UI Settings */
    --radius-pill: 50px;
    --radius-card: 24px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.25s ease;
}

/* Global Reset */
body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding-top: 110px; /* Account for fixed navbar + theme scroller */
}

/* Typography - Compact */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

/* 25% smaller headings */
h1 { font-size: 1.875rem; line-height: 1.2; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; }

/* Display sizes also reduced */
.display-1 { font-size: 3rem; }
.display-2 { font-size: 2.75rem; }
.display-3 { font-size: 2.5rem; }
.display-4 { font-size: 2rem; }
.display-5 { font-size: 1.5rem; }
.display-6 { font-size: 1.25rem; }

/* Navigation - Clean and Floating */
nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav.fixed-top {
    border-bottom: none;
}

/* Compact Buttons */
.btn, button {
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    border: none;
    cursor: pointer;
}

.btn-sm {
    padding: 2px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
}

.btn-lg {
    padding: 8px 16px;
    font-size: 0.95rem;
    border-radius: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: scale(1.03);
    background: #4f46e5;
}

.btn-light {
    background: var(--primary-light);
    color: var(--primary);
}

/* Preserve Bootstrap outline button borders */
[class*="btn-outline-"] {
    border: 2px solid;
    background: transparent;
}

.btn-outline-success {
    border-color: var(--bs-success, #198754);
    color: var(--bs-success, #198754);
}

.btn-outline-danger {
    border-color: var(--bs-danger, #dc3545);
    color: var(--bs-danger, #dc3545);
}

.btn-outline-secondary {
    border-color: var(--bs-secondary, #6c757d);
    color: var(--bs-secondary, #6c757d);
}

.btn-outline-primary {
    border-color: var(--bs-primary, #0d6efd);
    color: var(--bs-primary, #0d6efd);
}

[class*="btn-outline-"]:hover {
    color: white;
}

.btn-outline-success:hover {
    background: var(--bs-success, #198754);
}

.btn-outline-danger:hover {
    background: var(--bs-danger, #dc3545);
}

.btn-outline-secondary:hover {
    background: var(--bs-secondary, #6c757d);
}

.btn-outline-primary:hover {
    background: var(--bs-primary, #0d6efd);
}

/* Cards - The "Soft Cloud" Look */
.card, .tournament-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 30px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Avatars & Users */
.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Badges - Outlined Style */
.badge {
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    background: transparent !important;
    border: 1.5px solid currentColor;
}

.badge.bg-primary {
    color: var(--primary) !important;
    border-color: var(--primary);
}

.badge.bg-success {
    color: var(--success) !important;
    border-color: var(--success);
}

.badge.bg-secondary {
    color: var(--text-muted) !important;
    border-color: var(--text-muted);
}

.badge.bg-info {
    color: #3b82f6 !important;
    border-color: #3b82f6;
}

.badge.bg-warning {
    color: #d97706 !important;
    border-color: #d97706;
}

.badge.bg-danger {
    color: #ef4444 !important;
    border-color: #ef4444;
}

.badge.bg-dark {
    color: var(--text-main) !important;
    border-color: var(--text-main);
}

.badge.bg-light {
    color: var(--text-muted) !important;
    border-color: #e2e8f0;
}

/* Stats Counter for "Family/Friends" feel */
.stat-box {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

/* How it Works - Steps with Bubbles */
.step-circle {
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.card-header
{
background:none;
}

/* Tournament Card with Image Header */
.tournament-card-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
}

.tournament-card-image .card-img-header {
    position: relative;
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.tournament-card-image .card-img-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.tournament-card-image .card-img-header .header-content {
    position: relative;
    z-index: 2;
}

.tournament-card-image .card-img-header .tournament-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.tournament-card-image .card-img-header .tournament-theme {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
}

.tournament-card-image .card-img-header .tournament-status {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

/* Solid background badge (overrides transparent badges) */
.badge-solid-white {
    background-color: #fff !important;
    color: #333 !important;
}

/* Fallback when no image - gradient background */
.tournament-card-image .card-img-header.no-image {
    background: linear-gradient(135deg, var(--primary) 0%, #818cf8 100%);
}

.tournament-card-image .card-img-header.no-image::before {
    display: none;
}

/* ============================================
   GNSDK Brand Colors
   ============================================ */
.gnsdk-red {
    color: var(--gnsdk-red) !important;
    font-size: 110%;
    font-weight: 600;
}

/* ============================================
   Frontpage Sections
   ============================================ */
.hero-section {
    padding-top: 20px;
}

.hero-section .container {
    padding-top: 30px;
}

/* Question rotator - first section needs extra top spacing */
.question-rotator-section {
    margin-top: 15px;
}

/* Questions header on frontpage */
.questions-header {
    margin-top: 20px;
}

.frontpage-title {
    font-size: 1rem;
    color: var(--gnsdk-red);
}

@media (max-width: 768px) {
    .hero-section .container {
        padding-top: 20px;
    }

    .question-rotator-section {
        margin-top: 10px;
    }
}

/* ============================================
   Tournament Tabs - Single Row
   ============================================ */
#tournamentTabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#tournamentTabs::-webkit-scrollbar {
    display: none;
}

#tournamentTabs .nav-item {
    flex-shrink: 0;
}

#tournamentTabs .nav-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
}

#tournamentTabs .nav-link .badge {
    font-size: 0.65rem;
    padding: 2px 5px;
}

@media (max-width: 576px) {
    #tournamentTabs .nav-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }

    #tournamentTabs .nav-link .badge {
        font-size: 0.6rem;
        padding: 1px 4px;
    }
}

/* ============================================
   Chart Cards - Zero Padding
   ============================================ */
#answerTrendChart {
    margin: 0 !important;
    padding: 0 !important;
}

.card-body:has(#answerTrendChart) {
    padding: 0 !important;
    margin: 0 !important;
}

/* Fallback: add this class to chart card-body */
.chart-card-body {
    padding: 0 !important;
    margin: 0 !important;
}

/* ============================================
   Questions Page
   ============================================ */
.question-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.question-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.question-stats .stat-row .progress {
    background-color: #e9ecef;
}

.question-title {
    line-height: 1.4;
    font-size: 1rem;
}

/* ============================================
   Compact Layout Adjustments
   ============================================ */
.card, .tournament-card {
    padding: 20px;
}

.card-body {
    padding: 1rem;
}

.card-header {
    padding: 0.75rem 1rem;
}

/* Reduce section spacing */
.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.5rem !important; }

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 768px) {
    body {
        padding-top: 95px; /* Smaller navbar + theme scroller on mobile */
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    h4 { font-size: 1rem; }
    h5 { font-size: 0.9rem; }
    h6 { font-size: 0.8rem; }

    .display-1 { font-size: 2rem; }
    .display-2 { font-size: 1.75rem; }
    .display-3 { font-size: 1.5rem; }
    .display-4 { font-size: 1.35rem; }
    .display-5 { font-size: 1.25rem; }
    .display-6 { font-size: 1.1rem; }

    /* 50% reduced padding on cards */
    .card, .tournament-card {
        padding: 10px;
        border-radius: 16px;
    }

    .card-body {
        padding: 0.5rem;
    }

    .card-header {
        padding: 0.5rem 0.75rem;
    }

    /* 50% reduced container padding */
    .container, .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }

    .badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    nav {
        padding: 0.5rem 0;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: 85px; /* Even smaller on very small screens */
    }

    /* Extra compact cards on small phones */
    .card, .tournament-card {
        padding: 8px;
        border-radius: 12px;
    }

    .card-body {
        padding: 0.4rem;
    }

    /* Minimal container padding */
    .container, .container-fluid {
        padding-left: 6px;
        padding-right: 6px;
    }

    /* Questions page responsive */
    .questions-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .questions-header h1 {
        margin-bottom: 0;
    }

    .frontpage-title {
        font-size: 1rem;
    }

    .questions-header .btn-group {
        width: 100%;
    }

    .questions-header .btn-group .btn {
        flex: 1;
    }

    .question-title {
        font-size: 0.95rem;
    }

    .question-card .card-body {
        padding: 0.5rem !important;
    }

    .question-stats .stat-row {
        margin-bottom: 0.5rem !important;
    }

    /* Reduce section spacing further */
    .py-5 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .py-4 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
    .py-3 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
    .mb-4 { margin-bottom: 0.75rem !important; }
    .mb-3 { margin-bottom: 0.5rem !important; }
}

/* ============================================
   Theme Scroller
   ============================================ */
.theme-scroller-wrapper {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 99;
    padding: 6px 0;
}

.theme-scroller {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.theme-scroller::-webkit-scrollbar {
    display: none;
}

.theme-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9;
    color: var(--text-main);
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-pill:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.theme-pill.active {
    background: var(--primary);
    color: white;
}

.theme-pill .theme-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.theme-pill.active .theme-count {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .theme-scroller-wrapper {
        top: 56px;
        padding: 5px 0;
    }

    .theme-pill {
        padding: 3px 10px;
        font-size: 0.8rem;
    }
}

/* ============================================
   Breadcrumb Bar (fixed, below theme scroller)
   ============================================ */
.breadcrumb-bar-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 98;
    padding: 6px 0;
}

.breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.breadcrumb-bar::-webkit-scrollbar {
    display: none;
}

.breadcrumb-pill {
    display: inline-flex;
    align-items: center;
    padding:3px 10px;
    background: #f1f5f9;
    color: var(--text-main);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}

.breadcrumb-pill:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.breadcrumb-pill.active {
    background: var(--primary);
    color: white;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.7rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .breadcrumb-bar-wrapper {
        top: 56px;
        padding: 5px 0;
    }

    .breadcrumb-pill {
        padding: 3px 10px;
        font-size: 0.75rem;
    }
}