/* ===== Prompt Studio - Main Stylesheet ===== */
/* Light Theme (Default) + Dark Coffee Theme */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ===== CSS Variables - Light Theme (Default) ===== */
:root {
    --bg-primary: #F8F9FC;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F0F2F8;
    --bg-card: #FFFFFF;
    --bg-input: #F5F6FA;
    --bg-hover: #ECEEF5;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --text-primary: #1A1D2E;
    --text-secondary: #4A4F6A;
    --text-muted: #8B90A8;
    --text-inverse: #FFFFFF;
    --border-color: #E2E5F0;
    --border-light: #F0F1F7;
    --accent-1: #6C3CE1;
    --accent-2: #FF6B35;
    --accent-3: #00D4AA;
    --accent-4: #FF3B8B;
    --accent-5: #3B82F6;
    --accent-6: #F59E0B;
    --gradient-1: linear-gradient(135deg, #6C3CE1 0%, #A855F7 50%, #EC4899 100%);
    --gradient-2: linear-gradient(135deg, #FF6B35 0%, #FF3B8B 100%);
    --gradient-3: linear-gradient(135deg, #00D4AA 0%, #3B82F6 100%);
    --gradient-hero: linear-gradient(135deg, #6C3CE1 0%, #A855F7 30%, #EC4899 60%, #FF6B35 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.10);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 30px rgba(108, 60, 225, 0.15);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50px;
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-height: 72px;
    --sidebar-width: 280px;
}

/* ===== Dark Coffee Theme ===== */
[data-theme="dark"] {
    --bg-primary: #0D0907;
    --bg-secondary: #1A1210;
    --bg-tertiary: #231A16;
    --bg-card: #1E1512;
    --bg-input: #2A1F1B;
    --bg-hover: #322620;
    --bg-glass: rgba(26, 18, 16, 0.92);
    --text-primary: #F5E6D8;
    --text-secondary: #C4A88E;
    --text-muted: #8B7260;
    --text-inverse: #0D0907;
    --border-color: #3D2E26;
    --border-light: #2E211B;
    --accent-1: #B78AFF;
    --accent-2: #FF8F5E;
    --accent-3: #00FFD1;
    --accent-4: #FF5CA8;
    --accent-5: #5EA3FF;
    --accent-6: #FFD166;
    --gradient-1: linear-gradient(135deg, #B78AFF 0%, #E879F9 50%, #FF5CA8 100%);
    --gradient-2: linear-gradient(135deg, #FF8F5E 0%, #FF5CA8 100%);
    --gradient-3: linear-gradient(135deg, #00FFD1 0%, #5EA3FF 100%);
    --gradient-hero: linear-gradient(135deg, #B78AFF 0%, #E879F9 30%, #FF5CA8 60%, #FF8F5E 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(183, 138, 255, 0.2);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-ar);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: var(--transition);
    min-height: 100vh;
    overflow-x: hidden;
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

::selection {
    background: var(--accent-1);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 10px;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(40px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-40px)
    }

    to {
        opacity: 1;
        transform: translateX(0)
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9)
    }

    to {
        opacity: 1;
        transform: scale(1)
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.05)
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0
    }

    100% {
        background-position: 200% 0
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-10px)
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(108, 60, 225, 0.3)
    }

    50% {
        box-shadow: 0 0 40px rgba(108, 60, 225, 0.6)
    }
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.animate-fade {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.7s ease forwards;
}

.animate-scale {
    animation: scaleIn 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

/* ===== Layout ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-content {
    padding-top: calc(var(--nav-height) + 24px);
    min-height: 100vh;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-1 {
    gap: 8px;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.4rem;
}

.nav-brand .brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 60, 225, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-1);
    background: var(--bg-hover);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--accent-1);
    border-radius: 10px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-actions .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.nav-actions .btn-icon:hover {
    background: var(--bg-hover);
    color: var(--accent-1);
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.4rem;
    padding: 8px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-1);
    color: #fff;
    box-shadow: 0 4px 20px rgba(108, 60, 225, 0.3);
    background-size: 200% auto;
}

.btn-primary:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(108, 60, 225, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--accent-1);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--gradient-2);
    color: #fff;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.4);
}

.btn-success {
    background: var(--gradient-3);
    color: #fff;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-1);
}

.card-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.card-gradient {
    background: var(--gradient-1);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.card-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    animation: gradientMove 8s ease infinite;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* ===== Hero Section ===== */
.hero {
    padding: 100px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    border-radius: 50%;
    background: var(--gradient-hero);
    opacity: 0.08;
    filter: blur(100px);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-1);
    margin-bottom: 24px;
    animation: fadeIn 0.6s ease;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-3);
    animation: pulse 2s infinite;
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    animation: slideUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    animation: slideUp 0.8s ease 0.15s both;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    animation: slideUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    margin-top: 64px;
    animation: fadeIn 1s ease 0.5s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat .stat-num {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-stat .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: var(--transition);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 4px rgba(108, 60, 225, 0.1);
    background: var(--bg-secondary);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.7;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

[dir="ltr"] .form-select {
    background-position: right 16px center;
    padding-left: 18px;
    padding-right: 40px;
}

.input-group {
    position: relative;
}

.input-group .input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 16px;
    color: var(--text-muted);
}

[dir="ltr"] .input-group .input-icon {
    right: auto;
    left: 16px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--bg-tertiary);
    border-radius: 14px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.toggle-switch.active {
    background: var(--accent-1);
    border-color: var(--accent-1);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
    left: calc(100% - 22px);
}

/* ===== Tool Cards ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition);
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card .tool-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card.image .tool-icon {
    background: linear-gradient(135deg, #E8DAFF, #F3E8FF);
    color: #7C3AED;
}

.tool-card.video .tool-icon {
    background: linear-gradient(135deg, #FFE0D0, #FFEEE4);
    color: #FF6B35;
}

.tool-card.text .tool-icon {
    background: linear-gradient(135deg, #D0F5EA, #E6FAF3);
    color: #00D4AA;
}

.tool-card.creative .tool-icon {
    background: linear-gradient(135deg, #FFD6E8, #FFE8F1);
    color: #FF3B8B;
}

.tool-card.extra .tool-icon {
    background: linear-gradient(135deg, #D4E8FF, #E8F2FF);
    color: #3B82F6;
}

[data-theme="dark"] .tool-card.image .tool-icon {
    background: linear-gradient(135deg, #2D1854, #3D2270);
    color: #B78AFF;
}

[data-theme="dark"] .tool-card.video .tool-icon {
    background: linear-gradient(135deg, #3D1E0E, #4D2A18);
    color: #FF8F5E;
}

[data-theme="dark"] .tool-card.text .tool-icon {
    background: linear-gradient(135deg, #0E3D2E, #184D3A);
    color: #00FFD1;
}

[data-theme="dark"] .tool-card.creative .tool-icon {
    background: linear-gradient(135deg, #3D0E24, #4D1830);
    color: #FF5CA8;
}

[data-theme="dark"] .tool-card.extra .tool-icon {
    background: linear-gradient(135deg, #0E243D, #18304D);
    color: #5EA3FF;
}

.tool-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.tool-card .badge-premium {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--gradient-2);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== Prompt Generator Area ===== */
.generator-section {
    padding: 40px 0;
}

.generator-header {
    text-align: center;
    margin-bottom: 40px;
}

.generator-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.generator-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.generator-input .card {
    height: 100%;
}

.result-area {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.result-area .result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.result-area .result-content {
    flex: 1;
    padding: 20px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', monospace;
    position: relative;
}

.result-area .result-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    gap: 16px;
}

.result-area .result-empty i {
    font-size: 3rem;
    opacity: 0.3;
}

.result-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.options-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.option-chip {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.88rem;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.option-chip:hover,
.option-chip.active {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(108, 60, 225, 0.05);
}

[data-theme="dark"] .option-chip:hover,
[data-theme="dark"] .option-chip.active {
    background: rgba(183, 138, 255, 0.1);
}

/* ===== Features Section ===== */
.features-section {
    padding: 80px 0;
}

.features-section .section-header {
    text-align: center;
    margin-bottom: 56px;
}

.features-section .section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.features-section .section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.feature-card {
    text-align: center;
    padding: 36px 28px;
}

.feature-card .feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* ===== Membership / Pricing ===== */
.pricing-section {
    padding: 80px 0;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    text-align: center;
    padding: 40px 32px;
    position: relative;
}

.pricing-card.featured {
    background: var(--gradient-1);
    color: #fff;
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.pricing-card.featured .card-desc {
    color: rgba(255, 255, 255, 0.8);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 900;
    margin: 20px 0;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
}

.pricing-card .features-list {
    text-align: start;
    margin: 24px 0;
}

.pricing-card .features-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92rem;
}

.pricing-card .features-list li i {
    color: var(--accent-3);
}

.pricing-card.featured .features-list li i {
    color: #fff;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 24px;
    border-radius: var(--radius-full);
    background: var(--accent-6);
    color: #000;
    font-weight: 700;
    font-size: 0.8rem;
}

/* ===== Admin Panel ===== */
.admin-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: calc(100vh - var(--nav-height));
}

.admin-sidebar {
    background: var(--bg-secondary);
    border-inline-end: 1px solid var(--border-color);
    padding: 24px 16px;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
}

.admin-sidebar .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-bottom: 4px;
}

.admin-sidebar .sidebar-link:hover,
.admin-sidebar .sidebar-link.active {
    background: var(--bg-hover);
    color: var(--accent-1);
}

.admin-sidebar .sidebar-link.active {
    font-weight: 700;
}

.admin-sidebar .sidebar-link i {
    width: 20px;
    text-align: center;
}

.admin-content {
    padding: 32px;
}

.admin-header {
    margin-bottom: 32px;
}

.admin-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-info h4 {
    font-size: 1.6rem;
    font-weight: 800;
}

.stat-card .stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Table ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.data-table th {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

.badge {
    display: inline-flex;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-green {
    background: rgba(0, 212, 170, 0.1);
    color: #00D4AA;
}

.badge-red {
    background: rgba(255, 59, 139, 0.1);
    color: #FF3B8B;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.badge-purple {
    background: rgba(108, 60, 225, 0.1);
    color: #6C3CE1;
}

.badge-orange {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: var(--bg-primary);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-card .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-card .auth-header p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-card .auth-footer a {
    color: var(--accent-1);
    font-weight: 600;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--accent-4);
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 0.9rem;
    animation: slideUp 0.4s ease;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.toast-success {
    background: #00D4AA;
    color: #000;
}

.toast-error {
    background: #FF3B8B;
    color: #fff;
}

.toast-warning {
    background: #F59E0B;
    color: #000;
}

.toast-info {
    background: #3B82F6;
    color: #fff;
}

/* ===== Settings Page ===== */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.settings-row .setting-info h4 {
    font-weight: 600;
    margin-bottom: 4px;
}

.settings-row .setting-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Categories Tabs ===== */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.tab {
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.tab:hover,
.tab.active {
    border-color: var(--accent-1);
    color: var(--accent-1);
    background: rgba(108, 60, 225, 0.05);
}

[data-theme="dark"] .tab:hover,
[data-theme="dark"] .tab.active {
    background: rgba(183, 138, 255, 0.1);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 0 24px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-links h4 {
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.footer-links a {
    display: block;
    padding: 6px 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-1);
    padding-inline-start: 8px;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media(max-width:1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        display: none;
    }

    .generator-layout {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .grid-2,
    .grid-3,
    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: none;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .options-row {
        flex-direction: column;
    }
}

/* ===== Mobile Nav ===== */
.mobile-nav {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-secondary);
    z-index: 999;
    padding: 24px;
    transform: translateX(100%);
    transition: var(--transition);
    overflow-y: auto;
}

[dir="ltr"] .mobile-nav {
    transform: translateX(100%);
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav .nav-link {
    display: block;
    padding: 14px 16px;
    font-size: 1.05rem;
    border-radius: var(--radius-sm);
}

/* ===== Usage Bar ===== */
.usage-bar-wrap {
    margin-top: 16px;
}

.usage-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    border-radius: 10px;
    background: var(--gradient-1);
    transition: width 0.6s ease;
}

.usage-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== Suggestion Chips ===== */
.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.suggestion-chip {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.suggestion-chip:hover {
    color: var(--accent-1);
    border-color: var(--accent-1);
    background: rgba(108, 60, 225, 0.05);
}

/* ===== Prompt History ===== */
.history-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    transition: var(--transition);
}

.history-item:hover {
    border-color: var(--accent-1);
    box-shadow: var(--shadow-sm);
}

.history-item .history-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.history-item .history-text {
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===== Loading Skeleton ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ===== Twinkling Stars Background ===== */
@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes twinkle2 {

    0%,
    100% {
        opacity: 0.2;
    }

    30% {
        opacity: 1;
    }

    60% {
        opacity: 0.3;
    }

    80% {
        opacity: 0.8;
    }
}

@keyframes twinkle3 {

    0%,
    100% {
        opacity: 0.1;
        transform: scale(0.8);
    }

    25% {
        opacity: 0.9;
        transform: scale(1.2);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.9);
    }

    75% {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes starDrift {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }

    100% {
        transform: translateY(0);
    }
}

#stars-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(220, 225, 240, 1) 0%, rgba(200, 210, 230, 0.6) 40%, transparent 70%);
}

.star.silver {
    background: radial-gradient(circle, rgba(210, 215, 235, 1) 0%, rgba(190, 200, 220, 0.5) 40%, transparent 70%);
}

.star.bright {
    background: radial-gradient(circle, rgba(235, 240, 255, 1) 0%, rgba(200, 210, 240, 0.8) 30%, transparent 65%);
    box-shadow: 0 0 6px 1px rgba(220, 225, 250, 0.4);
}

.star.dim {
    background: radial-gradient(circle, rgba(180, 190, 210, 0.8) 0%, rgba(160, 170, 195, 0.3) 50%, transparent 70%);
}

[data-theme="dark"] .star {
    background: radial-gradient(circle, rgba(230, 235, 250, 1) 0%, rgba(210, 220, 240, 0.7) 35%, transparent 65%);
}

[data-theme="dark"] .star.silver {
    background: radial-gradient(circle, rgba(220, 228, 245, 1) 0%, rgba(200, 210, 235, 0.6) 40%, transparent 70%);
}

[data-theme="dark"] .star.bright {
    background: radial-gradient(circle, rgba(245, 248, 255, 1) 0%, rgba(220, 230, 250, 0.9) 25%, transparent 60%);
    box-shadow: 0 0 10px 2px rgba(200, 215, 255, 0.5), 0 0 20px 4px rgba(180, 200, 250, 0.2);
}

[data-theme="dark"] .star.dim {
    background: radial-gradient(circle, rgba(195, 205, 225, 0.9) 0%, rgba(175, 185, 210, 0.4) 45%, transparent 70%);
}

.page-content,
.footer,
.hero,
.features-section,
.pricing-section {
    position: relative;
    z-index: 1;
}

.navbar {
    z-index: 1000;
}

/* ===== Tool Info Card Content Fix (Light Mode) ===== */
/* This ensures that hardcoded white text from the admin panel becomes visible in Light Theme */
[data-theme="light"] .tool-info-card h2,
[data-theme="light"] .tool-info-card h3,
[data-theme="light"] .tool-info-card h4,
[data-theme="light"] .tool-info-card div,
[data-theme="light"] .tool-info-card span,
[data-theme="light"] .tool-info-card strong,
[data-theme="light"] .tool-info-card b {
    color: var(--text-primary) !important;
}

[data-theme="light"] .tool-info-card p,
[data-theme="light"] .tool-info-card li {
    color: var(--text-secondary) !important;
}

/* Override hardcoded dark backgrounds for small feature cards in Light Mode */
[data-theme="light"] .tool-info-card div[style*="background:#25262b"],
[data-theme="light"] .tool-info-card div[style*="background: #25262b"],
[data-theme="light"] .tool-info-card div[style*="background:#1a1b1e"],
[data-theme="light"] .tool-info-card div[style*="background: #1a1b1e"] {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Ensure borders are also adjusted */
[data-theme="light"] .tool-info-card div[style*="border:1px solid #373a40"],
[data-theme="light"] .tool-info-card div[style*="border: 1px solid #373a40"] {
    border-color: var(--border-color) !important;
}

/* Fix SVG icons visibility in light mode if they are inside tool-info-card */
[data-theme="light"] .tool-info-card svg {
    filter: brightness(0.5);
    /* Make dark icons if they were white */
}

[data-theme="light"] .tool-info-card div[style*="color:#4dabf7"] svg,
[data-theme="light"] .tool-info-card div[style*="color: #4dabf7"] svg {
    filter: none;
    /* Keep blue icons blue */
}