
:root {
    --bg: #F9FAFF;
    --bg-secondary: #FFFFFF;
    --surface: #FFFFFF;
    --surface-elevated: #F4F5FF;
    --text-primary: #11172D;
    --text-secondary: #53627A;
    --text-muted: #7D8AA3;
    --border: #E1E5F2;
    --primary: #635BFF;
    --primary-hover: #5046e5;
    --violet: #7C3AED;
    --pink: #D629A8;
    --shadow: 0 10px 35px rgba(0,0,0,0.06);
    --shadow-elevated: 0 12px 40px rgba(99, 91, 255, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --header-bg: rgba(255, 255, 255, 0.92);
}

[data-theme="never-trigger"] {
    --bg: #0B1020;
    --bg-secondary: #0A0F1D;
    --surface: #151C31;
    --surface-elevated: #1A223A;
    --text-primary: #F6F7FB;
    --text-secondary: #AAB4CB;
    --text-muted: #7F8AA3;
    --border: #27304A;
    --primary: #8B7CFF;
    --primary-hover: #a599ff;
    --violet: #9A6CFF;
    --pink: #E45AC1;
    --shadow: 0 10px 35px rgba(0,0,0,0.22);
    --shadow-elevated: 0 12px 40px rgba(0, 0, 0, 0.3);
    --header-bg: rgba(11, 16, 32, 0.92);
}

body {
    background-color: var(--bg);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Global Header */
.premium-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    height: 80px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.premium-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.desktop-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: var(--radius-xl);
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--surface-elevated);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(99, 91, 255, 0.1);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    padding: 16px;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
    pointer-events: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-mega {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 24px;
    width: 800px;
}

.dropdown-col h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    margin-top: 0;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.2s;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--surface-elevated);
}

.dropdown-item-icon {
    font-size: 1.2rem;
}

.dropdown-item-text strong {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.dropdown-item-text span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dropdown-simple {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background: var(--border);
}

/* Mobile Nav */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-panel {
    display: none;
}

@media (max-width: 992px) {
    .desktop-nav {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-nav-panel {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        z-index: 999;
        overflow-y: auto;
        padding: 24px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-nav-panel.open {
        transform: translateX(0);
    }
    
    .mobile-nav-group h4 {
        color: var(--text-muted);
        margin: 24px 0 12px 0;
        font-size: 0.9rem;
        text-transform: uppercase;
    }
    
    .mobile-nav-link {
        display: block;
        padding: 12px 16px;
        color: var(--text-primary);
        text-decoration: none;
        font-weight: 500;
        background: var(--surface);
        border-radius: var(--radius-md);
        margin-bottom: 8px;
        border: 1px solid var(--border);
    }
}

/* Premium Animated Hero */
.premium-hero {
    position: relative;
    padding: 100px 24px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 15%, rgba(99, 91, 255, 0.08), transparent 60%);
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
}

[data-theme="never-trigger"] .premium-hero {
    background: radial-gradient(circle at 50% 15%, rgba(99, 91, 255, 0.15), transparent 60%);
}

.hero-eyebrow {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.premium-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
    color: var(--text-primary);
}

.premium-hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
}

/* Orbit Animation */
.hero-animation-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 300px;
    margin: 40px auto 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.central-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    z-index: 10;
    width: 350px;
}

.central-card-input {
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-align: left;
}

.central-card-btn {
    background: var(--primary);
    color: white;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    width: 100%;
    cursor: default;
}

.floating-card {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: float 6s ease-in-out infinite;
    z-index: 5;
}

.fc-1 { top: 10%; left: 10%; animation-delay: 0s; }
.fc-2 { top: 20%; right: 10%; animation-delay: 1.5s; }
.fc-3 { bottom: 10%; left: 15%; animation-delay: 3s; }
.fc-4 { bottom: 15%; right: 15%; animation-delay: 4.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@media (prefers-reduced-motion: reduce) {
    .floating-card { animation: none !important; }
}

@media (max-width: 768px) {
    .fc-3, .fc-4 { display: none; }
    .hero-animation-container { height: 250px; }
}

/* Category Cards */
.premium-categories {
    max-width: 1280px;
    margin: 80px auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.premium-cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.premium-cat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-elevated);
}

.cat-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: inline-block;
}

.cat-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.cat-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

.cat-arrow {
    color: var(--primary);
    font-weight: 700;
}

/* Global Footer */
.premium-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 80px 24px 40px 24px;
    margin-top: 80px;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 16px;
    max-width: 300px;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--primary);
}

.footer-bottom {
    max-width: 1280px;
    margin: 60px auto 0 auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tool pages / General fixes */
.card, .tool-card-main {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    color: var(--text-primary);
}

input, select, textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-md);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.2);
}

.btn-primary {
    background: var(--primary);
    border-radius: var(--radius-md);
    border: none;
}
.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

/* Tool Hero specific */
.tool-hero {
    text-align: center;
    padding: 60px 24px 40px 24px;
    background: radial-gradient(circle at 50% 10%, rgba(99, 91, 255, 0.05), transparent 70%);
}
[data-theme="never-trigger"] .tool-hero {
    background: radial-gradient(circle at 50% 10%, rgba(99, 91, 255, 0.1), transparent 70%);
}
.tool-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.tool-hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}
