/* Custom styles for ZerOS Community - Modern Dark Tech Style */

:root {
    --bg-base: #07090e;
    --bg-surface: #10141d;
    --bg-glass: rgba(22, 27, 34, 0.65);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(88, 166, 255, 0.4);
    
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    --text-accent: #58a6ff;
    
    --accent-primary: #3b82f6;
    --accent-hover: #60a5fa;
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Global styles */
body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.2px;
    overflow-x: hidden;
}

/* Base elements */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
}

p {
    color: var(--text-muted);
    line-height: 1.6;
}

a {
    color: var(--text-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

/* Layout Utilities */
.bg-light {
    background-color: var(--bg-surface) !important;
}

.bg-dark {
    background-color: var(--bg-base) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.py-5 {
    padding: 5rem 0 !important;
}

/* Glassmorphic Cards */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-text {
    color: var(--text-muted);
}

.card-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 2rem;
}

/* Hero Section */
.hero {
    position: relative;
    background: var(--bg-base);
    overflow: hidden;
    padding: 8rem 0 6rem;
    border-bottom: 1px solid var(--border-subtle);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 80%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero .lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Buttons */
.btn {
    border-radius: var(--radius-sm);
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--text-main);
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-light {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-main);
    color: var(--text-main);
}

/* Navbar */
.navbar {
    background: rgba(7, 9, 14, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand {
    font-weight: 800 !important;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.05);
}

/* Forms */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    color: var(--text-main);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-label {
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--bg-surface) !important;
    border-top: 1px solid var(--border-subtle);
    margin-top: 3rem;
    padding: 4rem 0 2rem !important;
}

footer h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

footer p, footer li {
    color: var(--text-muted);
}

footer a {
    color: var(--text-muted);
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-accent);
}

/* Utilities & Animations */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Avatar Images */
.avatar-img {
    border: 3px solid var(--border-subtle);
    padding: 4px;
    background: var(--bg-surface);
    transition: all 0.3s ease;
}

.avatar-img:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* Admin Table overrides */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
    --bs-table-border-color: var(--border-subtle);
    color: var(--text-main);
}

.table > :not(caption) > * > * {
    padding: 1rem;
    background-color: transparent;
    border-bottom-color: var(--border-subtle);
}

/* Product Carousel */
.product-carousel-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.product-carousel-track {
    display: flex;
    gap: 1.5rem;
    will-change: transform;
}

.product-carousel-item {
    flex: 0 0 320px;
    min-width: 320px;
}

.product-carousel-item a {
    display: block;
    height: 100%;
}

.product-card {
    cursor: pointer;
    min-height: 320px;
}

.product-card:hover {
    transform: translateY(-6px) !important;
}

.product-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.product-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.product-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sponsors Section */
.sponsors-section {
    background: transparent;
    border-top: 1px solid var(--border-subtle);
}

.sponsors-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.sponsors-header i {
    color: #e74c6f;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.sponsors-header h5 {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.sponsors-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.sponsors-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.sponsor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.6rem;
    width: 300px;
    padding: 1.5rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sponsor-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.sponsor-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.sponsor-card-icon img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.sponsor-card-icon i {
    font-size: 1.3rem;
}

.sponsor-card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.sponsor-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.3;
}

.sponsor-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================================
   Responsive — Tablet (max-width: 992px)
   ============================================================ */
@media (max-width: 992px) {
    .hero {
        padding: 6rem 0 4rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .py-5 {
        padding: 3.5rem 0 !important;
    }
}

/* ============================================================
   Responsive — Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    .hero {
        text-align: center;
        padding: 4rem 0 2.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .lead {
        margin: 0 auto 1.5rem;
        font-size: 1rem;
    }

    .hero img {
        margin-top: 2rem;
        max-width: 240px !important;
    }

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

    .py-5 {
        padding: 2.5rem 0 !important;
    }

    .card-body {
        padding: 1.25rem;
    }

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

    .btn-lg {
        padding: 0.65rem 1.5rem;
        font-size: 1rem;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .product-carousel-item {
        flex: 0 0 260px;
        min-width: 260px;
    }

    .product-card {
        min-height: 280px;
    }

    .product-icon-wrapper {
        width: 64px;
        height: 64px;
        border-radius: 16px;
    }

    .sponsors-list {
        gap: 0.75rem;
    }

    .sponsor-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .sponsor-icon-wrap {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .sponsor-icon {
        width: 24px;
        height: 24px;
    }

    .sponsor-desc {
        max-width: 160px;
        font-size: 0.75rem;
    }

    footer {
        padding: 2.5rem 0 1.5rem !important;
    }

    footer h3 {
        font-size: 1.1rem;
    }

    .table > :not(caption) > * > * {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }

    .navbar {
        padding: 0.6rem 0;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-collapse {
        background: var(--bg-surface);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        margin-top: 0.75rem;
        padding: 0.75rem;
        box-shadow: var(--shadow-md);
    }

    .navbar-nav .nav-link {
        padding: 0.6rem 0.75rem !important;
    }

    .navbar-nav .gap-2 {
        gap: 0.5rem !important;
    }

    .navbar-nav .btn {
        width: 100%;
        text-align: center;
    }
}

/* ============================================================
   Responsive — Small Mobile (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.65rem;
    }

    .hero .lead {
        font-size: 0.9rem;
    }

    .display-3 { font-size: 1.65rem; }
    .display-4 { font-size: 1.5rem; }
    .display-5 { font-size: 1.3rem; }
    .display-6 { font-size: 1.2rem; }

    .card-body {
        padding: 1rem;
    }

    .btn-lg {
        padding: 0.6rem 1.2rem;
        font-size: 0.95rem;
    }

    .product-carousel-item {
        flex: 0 0 240px;
        min-width: 240px;
    }

    .sponsor-item {
        width: 100%;
        justify-content: center;
    }
}
