/* ==================================================
   🎨 GLOBAL RESET STYLES
   ================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================================================
   🎨 CSS VARIABLES (DESIGN SYSTEM)
   ================================================== */
:root {
    --primary: #0A0E27;
    --accent: #00D9FF;
    --accent-secondary: #7C3AED;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --bg: #F8FAFC;
    --card: #FFFFFF;
    --text: #1E293B;
    --text-light: #64748B;
    --border: #E2E8F0;
    --shadow: rgba(10, 14, 39, 0.08);
}

/* ==================================================
   🖥️ BODY STYLING
   ================================================== */
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================================================
   📦 MAIN CONTENT CONTAINER
   ================================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================================================
   🚀 HERO SECTION
   ================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a1f3a 100%);
    color: white;
    padding: 4rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    opacity: 0.15;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(0, 217, 255, 0.2);
    color: var(--accent);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

h1 {
    font-family: 'Archivo', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    max-width: 700px;
    margin-bottom: 2.5rem;
}

/* ==================================================
   📝 FORM STYLES
   ================================================== */
.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="text"] {
    flex: 1;
    padding: 1.2rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

/* ==================================================
   🔘 BUTTON STYLES
   ================================================== */
.btn {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================================================
   🎛️ PLATFORM SELECTOR
   ================================================== */
.platform-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.platform-btn {
    flex: 1;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.platform-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.platform-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

/* ==================================================
   🎯 FEATURES GRID
   ================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 0;
}

.feature-card {
    background: var(--card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 24px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 32px rgba(10, 14, 39, 0.15);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ==================================================
   💳 NICHE CARDS
   ================================================== */
.niche-card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 4px 24px var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.niche-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(10, 14, 39, 0.15);
}

.card-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.card-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-best {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-trending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-low-comp {
    background: rgba(0, 217, 255, 0.1);
    color: var(--accent);
}

.niche-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.niche-platform {
    font-size: 0.9rem;
    color: var(--text-light);
}

.card-body {
    padding: 2rem;
}

.validation-score {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary), #1a1f3a);
    color: white;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.score-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.score-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: 'Archivo', sans-serif;
}

.score-description {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.why-section {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.why-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.why-text {
    color: var(--text-light);
    line-height: 1.7;
}

.metrics-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* ==================================================
   🔽 EXPANDABLE SECTIONS
   ================================================== */
.expandable {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    cursor: pointer;
}

.expandable-header {
    padding: 1rem 1.5rem;
    background: var(--bg);
    font-weight: 600;
    user-select: none;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.expandable.open .expandable-content {
    max-height: 800px;
}

/* ==================================================
   🎬 CARD ACTIONS
   ================================================== */
.card-actions {
    padding: 1.5rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.btn-action {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    background: white;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    color: var(--text);
}

.btn-action:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-action.primary {
    background: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
}

.btn-action.primary:hover {
    background: #6d28d9;
    border-color: #6d28d9;
}

/* ==================================================
   📊 RESULTS SECTION
   ================================================== */
#results {
    padding: 4rem 0;
}

#results h2 {
    font-family: 'Archivo', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
}

/* ==================================================
   ⏳ LOADING STATE
   ================================================== */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 2rem;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================================================
   📱 RESPONSIVE DESIGN
   ================================================== */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    .input-group {
        flex-direction: column;
    }

    .platform-selector {
        flex-direction: column;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .trending-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .trending-banner-content {
        flex-direction: column;
    }
}

/* ==================================================
   🔥 TRENDING BANNER (on main page)
   ================================================== */
.trending-banner {
    background: linear-gradient(135deg, var(--accent-secondary), #9333ea);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 24px rgba(124, 58, 237, 0.3);
}

.trending-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.4);
}

.trending-banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trending-icon {
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.trending-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.trending-text p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.trending-btn {
    background: white;
    color: var(--accent-secondary);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.trending-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}