:root {
    --bg: #030712;
    --primary: #8b5cf6;
    --secondary: #d946ef;
    --accent: #3b82f6;
    --text: #f9fafb;
    --text-dim: #9ca3af;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow: rgba(139, 92, 246, 0.5);
    --gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --input-bg: rgba(0, 0, 0, 0.2);
    --input-text: white;
    --box-bg: rgba(0, 0, 0, 0.3);
    --card-hover: rgba(255, 255, 255, 0.08);
    --copy-bg: white;
    --copy-text: black;
}

[data-theme="light"] {
    --bg: #f3f4f6;
    --text: #111827;
    --text-dim: #4b5563;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --input-bg: rgba(255, 255, 255, 0.9);
    --input-text: #111827;
    --box-bg: rgba(255, 255, 255, 0.6);
    --card-hover: rgba(255, 255, 255, 0.9);
    --copy-bg: var(--primary);
    --copy-text: white;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Premium Background */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('bg.png') center/cover no-repeat;
    opacity: 0.15;
    z-index: -1;
    filter: blur(2px);
}

.bg-animation {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow) 0%, transparent 40%);
    opacity: 0.3;
    z-index: -2;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--secondary);
    filter: drop-shadow(0 0 10px var(--secondary));
}

.accent-text {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s;
}

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

.btn-small {
    padding: 10px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
}

.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    color: var(--text);
}

/* Hero Section */
.hero-section {
    padding: 100px 0;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 6px 15px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50px;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

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

.hero-section p {
    color: var(--text-dim);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 50px;
}

/* Generator Utility */
.generator-container {
    max-width: 800px;
    margin: 0 auto;
}

.glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.floating-label-input {
    flex: 2;
    position: relative;
    display: flex;
    align-items: center;
}

.floating-label-input i {
    position: absolute;
    left: 20px;
    color: var(--text-dim);
}

.floating-label-input input {
    width: 100%;
    padding: 20px 20px 20px 50px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--input-text);
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

.floating-label-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.platform-picker {
    flex: 1;
}

.platform-picker select {
    width: 100%;
    padding: 20px;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--input-text);
    font-size: 1rem;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.glow-btn {
    width: 100%;
    padding: 22px;
    background: var(--gradient);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px -5px var(--glow);
}

.glow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--glow);
}

.glow-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.glow-btn:hover::after {
    left: 200%;
}

/* Results Section */
.results-section {
    padding: 50px 0;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.stat-pill {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-dim);
    margin-right: 10px;
}

.stat-pill i {
    color: var(--accent);
}

.copy-primary {
    background: var(--copy-bg);
    color: var(--copy-text);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-primary:hover {
    background: #e2e8f0;
    transform: scale(1.02);
}

.hashtags-box {
    background: var(--box-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    line-height: 1.8;
    font-size: 1.1rem;
    word-break: break-all;
}

.hashtag-category {
    margin-top: 30px;
}

.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.cat-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cat-header h3 i {
    color: var(--secondary);
}

.mt-4 {
    margin-top: 40px;
}

/* Trending Grid */
.trending-grid {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 50px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.trend-card {
    padding: 40px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.trend-card:hover {
    background: var(--card-hover);
    border-color: var(--primary);
    transform: translateY(-10px);
}

.trend-card i {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.trend-card h3 {
    margin-bottom: 10px;
}

.trend-card p {
    color: var(--text-dim);
}

/* Info Section */
.info-section {
    display: flex;
    gap: 20px;
    margin-bottom: 100px;
}

.info-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 40px;
}

.info-card i {
    font-size: 2rem;
    color: var(--accent);
}

.hidden { display: none !important; }

/* SEO Article */
.seo-article-section {
    padding: 100px 0;
}
.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px;
    line-height: 1.9;
    font-size: 1.15rem;
}
.article-container h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary);
    line-height: 1.3;
}
.article-container h3 {
    font-size: 1.8rem;
    margin: 50px 0 20px;
    color: var(--secondary);
}
.article-container h4 {
    font-size: 1.4rem;
    margin: 40px 0 15px;
}
.article-container p {
    margin-bottom: 25px;
    color: var(--text-dim);
}
.article-container ul {
    margin: 0 0 30px 40px;
    color: var(--text-dim);
}
.article-container li {
    margin-bottom: 12px;
}

[data-theme="light"] .article-container p,
[data-theme="light"] .article-container ul {
    color: #374151;
}

/* Blog Section */
.blog-section {
    padding: 100px 0;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.blog-card {
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    background: var(--glass);
    border: 1px solid var(--glass-border);
}
.blog-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary);
}
.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}
.blog-content {
    padding: 30px;
}
.blog-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.5;
    color: var(--text);
}
.blog-content p {
    color: var(--text-dim);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.7;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: gap 0.3s;
}
.read-more:hover {
    gap: 12px;
}
.main-footer {
    padding: 50px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-dim);
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .input-row { flex-direction: column; }
    .nav-links { display: none; }
    .info-section { flex-direction: column; }
    h1 { font-size: 3rem; }
}

/* Loader */
.loader {
    width: 25px;
    height: 25px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s infinite linear;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
