/* ============================================
   SNAPDO - PREMIUM DARK THEME
   Modern, Eye-Catching, Premium Design
   ============================================ */

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

:root {
    /* Dark Premium Color Palette */
    --bg-primary: #0a0a0f;
    --bg-secondary: #0f172a;
    --bg-card: rgba(15, 23, 42, 0.6);
    --bg-card-hover: rgba(15, 23, 42, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #e2e8f0;
    
    --accent-primary: #0ea5e9;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-glow: rgba(14, 165, 233, 0.5);
    
    --border-light: rgba(255, 255, 255, 0.1);
    --border-glow: rgba(14, 165, 233, 0.3);
    
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(14, 165, 233, 0.2);
    
    /* Category Colors */
    --coding: #3b82f6;
    --coding-glow: rgba(59, 130, 246, 0.4);
    --trading: #10b981;
    --trading-glow: rgba(16, 185, 129, 0.4);
    --tools: #8b5cf6;
    --tools-glow: rgba(139, 92, 246, 0.4);
    --tips: #f59e0b;
    --tips-glow: rgba(245, 158, 11, 0.4);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    --gradient-secondary: linear-gradient(135deg, #8b5cf6, #ec4899);
    --gradient-accent: linear-gradient(135deg, #0ea5e9, #ec4899);
    --gradient-dark: linear-gradient(180deg, #0a0a0f 0%, #0f172a 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

/* ---------- HEADER - GLASSMORPHISM NAV ---------- */
header {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 2rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6, #ec4899);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

.logo a span {
    position: absolute;
    right: -8px;
    top: 0;
    color: var(--accent-primary);
    font-size: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::before {
    width: 100%;
}

/* ---------- HERO - PREMIUM ANIMATED ---------- */
.hero {
    text-align: center;
    padding: 6rem 2rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    background: linear-gradient(135deg, 
        #f8fafc 0%, 
        #0ea5e9 25%, 
        #8b5cf6 50%, 
        #ec4899 75%,
        #f8fafc 100%
    );
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 6s ease infinite;
    text-shadow: 0 0 60px rgba(14, 165, 233, 0.3);
}

@keyframes textGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.hero .subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 300;
}

/* ---------- PILLARS - GLASSMORPHISM CARDS ---------- */
.pillars {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.pillar-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.pillar-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    opacity: 0.8;
}

.pillar-card[data-category="coding"] { --accent-color: var(--coding); }
.pillar-card[data-category="trading"] { --accent-color: var(--trading); }
.pillar-card[data-category="tools"] { --accent-color: var(--tools); }
.pillar-card[data-category="tips"] { --accent-color: var(--tips); }

.pillar-card:hover {
    transform: translateY(-12px) scale(1.02);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    box-shadow: 
        var(--shadow-medium),
        0 0 30px var(--accent-glow);
}

.pillar-card h2 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}

.pillar-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.pillar-card a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.pillar-card a:hover {
    gap: 0.75rem;
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* ---------- LATEST POSTS - PREMIUM CARDS ---------- */
.latest-posts {
    max-width: 1200px;
    margin: 6rem auto;
    padding: 0 2rem;
}

.latest-posts h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.latest-posts h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-glow);
}

.post-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transition: left 0.5s ease;
}

.post-card:hover::before {
    left: 100%;
}

.post-card:hover {
    transform: translateY(-8px);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    box-shadow: 
        var(--shadow-medium),
        0 0 30px rgba(14, 165, 233, 0.15);
}

.category {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.category::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    filter: blur(10px);
    opacity: 0.5;
    z-index: -1;
}

.post-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.post-card:hover h3 {
    color: var(--accent-primary);
}

.post-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.date {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ---------- AD CONTAINER ---------- */
.ad-container {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-light);
}

/* ---------- ABOUT - PREMIUM SECTION ---------- */
.about {
    max-width: 800px;
    margin: 6rem auto;
    padding: 3rem;
    text-align: center;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.about h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.about p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* ---------- FOOTER ---------- */
footer {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-light);
    padding: 4rem 2rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 6rem;
}

footer p {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* ---------- LEGAL PAGES ---------- */
.legal-page {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid var(--border-light);
}

.legal-page h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.last-updated {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2.5rem;
}

.legal-page h2 {
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.5rem;
}

.legal-page h3 {
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.2rem;
}

.legal-page p,
.legal-page li {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ---------- CONTACT PAGE ---------- */
.contact-page {
    max-width: 800px;
    margin: 4rem auto;
    padding: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid var(--border-light);
    text-align: center;
}

.contact-page h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--border-glow);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 4rem 1.5rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .pillars {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
        margin: 3rem auto;
    }
    
    .latest-posts {
        padding: 0 1.5rem;
        margin: 3rem auto;
    }
    
    .latest-posts h2 {
        font-size: 2rem;
    }
    
    .post-list {
        grid-template-columns: 1fr;
    }
    
    .about,
    .legal-page,
    .contact-page {
        margin: 3rem 1.5rem;
        padding: 2rem;
    }
    
    .contact-links {
        flex-direction: column;
        align-items: center;
    }
    
    nav {
        padding: 1rem 1.5rem;
    }
    
    .logo a {
        font-size: 1.5rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .pillars {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens */
@media (min-width: 1400px) {
    nav,
    .latest-posts,
    .ad-container {
        max-width: 1300px;
    }
}

/* ---------- CUSTOM SCROLLBAR ---------- */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-secondary), var(--accent-tertiary));
}

/* ---------- SELECTION ---------- */
::selection {
    background: rgba(14, 165, 233, 0.3);
    color: var(--text-primary);
}
