/* ================================================
   PromptUPAi - AI Prompt Generator
   Beautiful, Modern CSS Styling
   ================================================ */

/* CSS Variables - Light Theme (Default) */
:root {
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Colors */
    --background: #ffffff;
    --foreground: #0f172a;
    --card: #f8fafc;
    --card-foreground: #0f172a;
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --primary-hover: #2563eb;
    --secondary: #e2e8f0;
    --secondary-foreground: #0f172a;
    --muted: #f1f5f9;
    --muted-foreground: #64748b;
    --accent: #f1f5f9;
    --accent-foreground: #0f172a;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #e2e8f0;
    --input: #e2e8f0;
    --ring: #3b82f6;
    
    /* Spacing */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Dark Theme */
[data-theme="dark"] {
    --background: #0f172a;
    --foreground: #f1f5f9;
    --card: #1e293b;
    --card-foreground: #f1f5f9;
    --primary: #3b82f6;
    --primary-foreground: #ffffff;
    --primary-hover: #60a5fa;
    --secondary: #334155;
    --secondary-foreground: #f1f5f9;
    --muted: #1e293b;
    --muted-foreground: #94a3b8;
    --accent: #334155;
    --accent-foreground: #f1f5f9;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #334155;
    --input: #334155;
    --ring: #3b82f6;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ================================================
   Header
   ================================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    border-bottom: 1px solid var(--border);
    background-color: var(--background);
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    border-radius: var(--radius);
    color: var(--primary-foreground);
}

.logo-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.logo-icon-lg {
    width: 3rem;
    height: 3rem;
}

.logo-icon-lg svg {
    width: 1.5rem;
    height: 1.5rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 600;
}

.logo-image {
    width: 250px;
    height: 80px;
}

.footer-logo-image {
    width: 250px;
    height: 80px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Theme Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: transparent;
    color: var(--foreground);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-icon-light {
    display: none;
}

[data-theme="dark"] .theme-icon-dark {
    display: none;
}

[data-theme="dark"] .theme-icon-light {
    display: block;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: transform 0.2s;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 14rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.2s;
}

.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
}

.user-avatar-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.25rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: var(--foreground);
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background: var(--muted);
    color: var(--foreground);
}

.dropdown-item svg {
    width: 1rem;
    height: 1rem;
}

.dropdown-item-danger {
    color: var(--destructive);
}

.dropdown-item-danger:hover {
    color: var(--destructive);
}

/* ================================================
   Buttons
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 1rem;
    height: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
    margin-top: 0.75rem;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--muted);
    border-color: var(--muted-foreground);
}

.btn-secondary svg {
    margin-left: 0.5rem;
}

.btn-outline {
    background: transparent;
    color: var(--foreground);
    border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
    background: var(--muted);
}

.btn-danger {
    background: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}

.btn-danger:hover:not(:disabled) {
    opacity: 0.9;
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--muted-foreground);
    border: none;
}

.btn-icon:hover:not(:disabled) {
    color: var(--foreground);
    background: var(--muted);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-sm svg {
    width: 0.875rem;
    height: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-lg svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-block {
    width: 100%;
}

/* ================================================
   Forms
   ================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.required {
    color: var(--destructive);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    background: var(--background);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted-foreground);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em;
    padding-right: 2.5rem;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.form-hint {
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ================================================
   Cards
   ================================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.card-title svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-content {
    padding: 1.25rem;
}

/* ================================================
   Badges
   ================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-model {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-platform {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
}

.badge-task {
    background: var(--muted);
    color: var(--muted-foreground);
}

[data-theme="dark"] .badge-model {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

[data-theme="dark"] .badge-platform {
    background: rgba(168, 85, 247, 0.2);
    color: #c084fc;
}

/* ================================================
   Alerts
   ================================================ */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.alert svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--destructive);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
    position: relative;
    padding: 6rem 0 8rem;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.05) 50%, transparent 100%);
}

.hero-glow {
    position: absolute;
    width: 20rem;
    height: 20rem;
    border-radius: var(--radius-full);
    filter: blur(80px);
    opacity: 0.4;
    pointer-events: none;
}

.hero-glow-left {
    left: -5rem;
    top: 20%;
    background: var(--primary);
}

.hero-glow-right {
    right: -5rem;
    top: 30%;
    background: #8b5cf6;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-badge svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-title-gradient {
    display: block;
    background: linear-gradient(135deg, var(--primary) 0%, rgba(59, 130, 246, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 36rem;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
}

/* ================================================
   Task Types Bar
   ================================================ */
.task-types-bar {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--muted);
}

.task-types-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 3rem;
}

.task-type-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 500;
}

.task-type-item svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ================================================
   Rating Section
   ================================================ */
.rating-section {
    padding: 4rem 0;
    background: var(--background);
}

.rating-card {
    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}

.rating-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.rating-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.rating-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
}

.star-rating {
    display: flex;
    gap: 0.5rem;
}

.star-btn {
    padding: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-icon {
    width: 2rem;
    height: 2rem;
    color: #fbbf24;
    transition: color 0.2s;
}

.star-btn:hover .star-icon,
.star-btn.active .star-icon {
    color: #f59e0b;
}

.rating-feedback {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ================================================
   Features Section
   ================================================ */
.features-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

@media (min-width: 640px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
}

.features-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius);
}

.feature-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--muted-foreground);
    font-size: 0.9375rem;
}

/* ================================================
   How It Works Section
   ================================================ */
.how-it-works {
    padding: 6rem 0;
    background: var(--muted);
}

.steps-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 56rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-grid {
        flex-direction: row;
        align-items: flex-start;
    }
}

.step-card {
    text-align: center;
    flex: 1;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.step-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.step-connector {
    display: none;
    width: 100%;
    height: 2px;
    background: var(--border);
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .step-connector {
        display: block;
        flex: 0.5;
    }
}

/* ================================================
   CTA Section
   ================================================ */
.cta-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.cta-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(147, 51, 234, 0.05) 100%);
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 32rem;
    margin: 0 auto;
}

.cta-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-description {
    color: var(--muted-foreground);
    margin-bottom: 2rem;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.875rem;
}

.footer-links a {
    color: var(--muted-foreground);
}

.footer-links a:hover {
    color: var(--foreground);
}

.footer-credit {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ================================================
   Auth Pages
   ================================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 3.5rem);
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 24rem;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo-icon {
    margin: 0 auto 1rem;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-description {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ================================================
   Generator Page
   ================================================ */
.generator-page {
    padding: 2rem 0 4rem;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header-flex {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
}

@media (min-width: 640px) {
    .page-header-flex {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.page-description {
    color: var(--muted-foreground);
}

.generator-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .generator-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.generator-form {
    display: flex;
    flex-direction: column;
}

/* Task Type Grid */
.task-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .task-type-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.task-type-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s;
}

.task-type-btn:hover {
    background: var(--muted);
}

.task-type-btn.active {
    background: rgba(59, 130, 246, 0.05);
    border-color: var(--primary);
    color: var(--primary);
}

.task-type-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.task-type-btn span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Category Chips */
.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-chip {
    padding: 0.375rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    color: var(--foreground);
    cursor: pointer;
    transition: all 0.2s;
}

.category-chip:hover {
    background: var(--muted);
}

.category-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--primary-foreground);
}

/* Output Panel */
.output-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prompt-output {
    min-height: 12rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    text-align: center;
}

.empty-state svg {
    width: 2rem;
    height: 2rem;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
    opacity: 0.5;
}

.empty-title {
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.empty-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    opacity: 0.7;
}

.prompt-text {
    padding: 1rem;
    background: var(--muted);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

.prompt-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Tips Card */
.tips-card {
    overflow: hidden;
}

.tips-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--foreground);
}

.tips-toggle:hover {
    background: var(--muted);
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.tips-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #eab308;
}

.tips-chevron {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--muted-foreground);
    transition: transform 0.2s;
}

.tips-card.open .tips-chevron {
    transform: rotate(180deg);
}

.tips-content {
    display: none;
    padding: 0 1.25rem 1.25rem;
}

.tips-content.open {
    display: block;
}

.tips-list {
    list-style: none;
}

.tips-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.tips-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 0.375rem;
    height: 0.375rem;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* ================================================
   History Page
   ================================================ */
.history-page {
    padding: 2rem 0 4rem;
}

.search-box {
    position: relative;
    width: 100%;
}

@media (min-width: 640px) {
    .search-box {
        width: 16rem;
    }
}

.search-box svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    font-size: 0.875rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
}

.search-input:focus {
    outline: none;
    border-color: var(--ring);
}

.prompts-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .prompts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.prompt-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.prompt-card:hover {
    box-shadow: var(--shadow-md);
}

.prompt-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1rem 0.75rem;
}

.prompt-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prompt-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.prompt-card:hover .prompt-actions {
    opacity: 1;
}

.prompt-card-body {
    padding: 0 1rem;
}

.prompt-original-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
    margin-bottom: 0.25rem;
}

.prompt-original {
    font-size: 0.875rem;
    color: var(--foreground);
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.prompt-generated {
    padding: 0.75rem;
    background: var(--muted);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.prompt-generated pre {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.prompt-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem 1rem;
}

.prompt-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.prompt-time svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* Empty State Page */
.empty-state-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem;
    text-align: center;
}

.empty-state-page svg {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
    opacity: 0.5;
}

.empty-state-page h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state-page p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    max-width: 24rem;
}

.empty-search-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    text-align: center;
}

.empty-search-state svg {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
    opacity: 0.5;
}

.empty-search-state h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-search-state p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

/* ================================================
   Modal
   ================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 24rem;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ================================================
   Toast
   ================================================ */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    padding: 0.75rem 1.25rem;
    background: var(--foreground);
    color: var(--background);
    font-size: 0.875rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    z-index: 200;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast.success {
    background: #16a34a;
    color: white;
}

.toast.error {
    background: var(--destructive);
    color: white;
}

/* ================================================
   Utilities
   ================================================ */
.spin {
    animation: spin 1s linear infinite;
}

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

.avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ================================================
   Guest Banner
   ================================================ */
.guest-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    color: white;
    padding: 0.75rem 0;
}

.guest-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.guest-banner-content i {
    width: 1rem;
    height: 1rem;
}

.guest-banner .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.guest-banner .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ================================================
   Limit Modal
   ================================================ */
.limit-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.limit-modal {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    max-width: 28rem;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.limit-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.limit-modal-icon i {
    width: 2rem;
    height: 2rem;
    color: white;
}

.limit-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.75rem;
}

.limit-modal-description {
    font-size: 1rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.limit-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.limit-modal-actions .btn-primary {
    width: 100%;
}

.limit-modal-actions .btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.limit-modal-actions .btn-outline:hover {
    background: var(--muted);
    color: var(--foreground);
}

/* ================================================
   Pure PHP Form Styles (No JavaScript)
   ================================================ */

/* Alert Messages */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

[data-theme="dark"] .alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.3);
}

.alert svg {
    flex-shrink: 0;
}

/* Radio Grid (Task Types) */
.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.radio-card {
    position: relative;
    cursor: pointer;
}

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.radio-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-align: center;
}

.radio-card-content svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.radio-card-content span {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--foreground);
}

.radio-card:hover .radio-card-content {
    border-color: var(--primary);
}

.radio-card.selected .radio-card-content,
.radio-card input[type="radio"]:checked + .radio-card-content {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.08);
}

.radio-card.selected .radio-card-content svg,
.radio-card input[type="radio"]:checked + .radio-card-content svg {
    color: var(--primary);
}

/* Category Chips PHP */
.category-chips-php {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.chip-label {
    position: relative;
    cursor: pointer;
}

.chip-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.chip-label span {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--muted);
    border: 2px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: all 0.2s ease;
}

.chip-label:hover span {
    background: var(--secondary);
    color: var(--foreground);
}

.chip-label.selected span,
.chip-label input[type="radio"]:checked + span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Prompt Output PHP */
.prompt-output-php {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.prompt-textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--foreground);
    resize: vertical;
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.copy-hint {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-align: center;
    padding: 0.5rem;
    background: var(--accent);
    border-radius: var(--radius);
}

/* Tips Card PHP (using details/summary) */
.tips-card-php {
    margin-top: 1rem;
}

.tips-toggle-php {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    list-style: none;
    transition: all 0.2s;
}

.tips-toggle-php::-webkit-details-marker {
    display: none;
}

.tips-toggle-php svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

.tips-toggle-php .chevron {
    margin-left: auto;
    transition: transform 0.2s;
}

.tips-card-php[open] .tips-toggle-php .chevron {
    transform: rotate(180deg);
}

.tips-toggle-php span {
    font-weight: 500;
    color: var(--foreground);
}

.tips-toggle-php:hover {
    background: var(--muted);
}

.tips-content-php {
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
}

.tips-content-php .tips-list {
    padding-left: 1.5rem;
    margin: 0;
}

.tips-content-php .tips-list li {
    padding: 0.375rem 0;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

/* Select Dropdown Styling */
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    color: var(--foreground);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-select:hover {
    border-color: var(--primary);
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select optgroup {
    font-weight: 600;
    color: var(--foreground);
    background: var(--card);
    padding: 0.5rem 0;
}

.form-select option {
    padding: 0.5rem 1rem;
    color: var(--foreground);
    background: var(--background);
}

[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* ==========================================
   Static Pages Styling
   ========================================== */

.static-page {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.static-page .prose {
    max-width: none;
    line-height: 1.8;
}

.static-page .prose h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.static-page .prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.static-page .prose p {
    margin-bottom: 1rem;
    color: var(--muted-foreground);
}

.static-page .prose ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.static-page .prose ul li {
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
}

.static-page .prose a {
    color: var(--primary);
    text-decoration: underline;
}

.static-page .prose a:hover {
    text-decoration: none;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    font-style: italic;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

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

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item svg {
    color: var(--primary);
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--foreground);
}

.info-item p {
    color: var(--muted-foreground);
    margin: 0;
}

.contact-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* ==========================================
   Footer Styling
   ========================================== */

.site-footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    text-decoration: none;
}

.footer-logo svg {
    color: var(--primary);
}

.footer-tagline {
    margin-top: 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

@media (max-width: 480px) {
    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

.footer-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-section ul a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin: 0;
}

/* ==========================================
   FAQ Page Styling
   ========================================== */

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-section {
    margin-bottom: 3rem;
}

.faq-section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.faq-section-title svg {
    color: var(--primary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item[open] {
    border-color: var(--primary);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    color: var(--foreground);
    cursor: pointer;
    list-style: none;
    transition: background 0.2s;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--muted-foreground);
    border-bottom: 2px solid var(--muted-foreground);
    transform: rotate(-45deg);
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-question:hover {
    background: var(--accent);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.faq-answer ul li,
.faq-answer ol li {
    margin-bottom: 0.5rem;
}

.faq-answer a {
    color: var(--primary);
    text-decoration: underline;
}

.faq-answer a:hover {
    text-decoration: none;
}

.faq-cta {
    margin-top: 3rem;
}

.faq-cta h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.faq-cta p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.faq-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.text-center {
    text-align: center;
}

/* ==========================================
   Header Navigation
   ========================================== */

.header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
    color: var(--foreground);
    background: var(--accent);
}

@media (max-width: 768px) {
    .header-nav {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 0;
    }
    
    .header-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border);
    }
}

/* ==========================================
   Article Page Styles
   ========================================== */

.article-page .page-title {
    font-size: 1.75rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .article-page .page-title {
        font-size: 2.25rem;
    }
}

.article-intro {
    font-size: 1.125rem;
    color: var(--foreground);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.article-page .prose h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.article-page .prose h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
}

.article-page .prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.article-page .prose ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-page .prose ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.article-cta {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border-radius: var(--radius-lg);
    text-align: center;
}

.article-cta h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    margin-top: 0 !important;
}

.article-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.article-cta .btn-primary {
    background: #ffffff;
    color: var(--primary);
    font-weight: 600;
}

.article-cta .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* FAQ Article Link */
.faq-article-link {
    margin-top: 1.5rem;
}

.faq-article-link .card {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    border: none;
}

.faq-article-link .card-content {
    text-align: center;
    padding: 1.5rem;
}

.faq-article-link h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.faq-article-link p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
}

.faq-article-link .btn-primary {
    background: #ffffff;
    color: var(--primary);
    font-weight: 600;
}

.faq-article-link .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Homepage Article Section */
.home-article-section {
    margin-top: 2rem;
}

.home-article-section .card {
    max-width: 900px;
    margin: 0 auto;
}

.home-article-section .article-main-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .home-article-section .article-main-title {
        font-size: 2rem;
    }
}

.home-article-section .article-intro {
    font-size: 1.0625rem;
    color: var(--foreground);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.home-article-section .prose h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--foreground);
}

.home-article-section .prose h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
}

.home-article-section .prose p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--foreground);
}

.home-article-section .prose ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.home-article-section .prose ul li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: var(--foreground);
}

/* Homepage FAQ Section */
.home-faq-section {
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.home-faq-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--foreground);
    text-align: center;
    margin-bottom: 1.5rem;
}

.home-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.home-faq-list .faq-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.home-faq-list .faq-question {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-faq-list .faq-question::-webkit-details-marker {
    display: none;
}

.home-faq-list .faq-question::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--muted-foreground);
    transition: transform 0.2s;
}

.home-faq-list details[open] .faq-question::after {
    content: '−';
}

.home-faq-list .faq-answer {
    padding: 0 1.25rem 1rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.home-faq-more {
    text-align: center;
    margin-top: 1.5rem;
}

/* Button Loading Animation */
.btn-loading-animation {
    margin-top: 1rem;
    text-align: center;
}

.loading-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.loading-progress-fill {
    height: 100%;
    width: 30%;
    background: var(--primary);
    border-radius: 3px;
    animation: progressSlide 1.5s ease-in-out infinite;
}

@keyframes progressSlide {
    0% { width: 0%; margin-left: 0%; }
    50% { width: 50%; margin-left: 25%; }
    100% { width: 0%; margin-left: 100%; }
}

.loading-progress-text {
    color: var(--muted-foreground);
    font-size: 0.9375rem;
    margin: 0;
}

/* Copy Hint */
.copy-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--muted);
    border-radius: 6px;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
}

.copy-hint svg {
    flex-shrink: 0;
    color: var(--primary);
}

/* Copy Button */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    margin-top: 1rem;
    background: transparent;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
}

.copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.copy-btn svg {
    flex-shrink: 0;
}

/* Loading Popup */
.loading-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    margin-top: 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

.loading-popup p {
    margin-top: 1rem;
    color: var(--muted-foreground);
    font-size: 0.9375rem;
}

/* iOS-style Spinner */
.ios-spinner {
    width: 40px;
    height: 40px;
    position: relative;
}

.ios-spinner div {
    position: absolute;
    width: 6px;
    height: 14px;
    background: var(--foreground);
    border-radius: 3px;
    left: 50%;
    top: 50%;
    transform-origin: center -8px;
    animation: ios-spin 1s linear infinite;
}

.ios-spinner div:nth-child(1) { transform: translate(-50%, 8px) rotate(0deg); animation-delay: -0.916s; }
.ios-spinner div:nth-child(2) { transform: translate(-50%, 8px) rotate(30deg); animation-delay: -0.833s; }
.ios-spinner div:nth-child(3) { transform: translate(-50%, 8px) rotate(60deg); animation-delay: -0.75s; }
.ios-spinner div:nth-child(4) { transform: translate(-50%, 8px) rotate(90deg); animation-delay: -0.666s; }
.ios-spinner div:nth-child(5) { transform: translate(-50%, 8px) rotate(120deg); animation-delay: -0.583s; }
.ios-spinner div:nth-child(6) { transform: translate(-50%, 8px) rotate(150deg); animation-delay: -0.5s; }
.ios-spinner div:nth-child(7) { transform: translate(-50%, 8px) rotate(180deg); animation-delay: -0.416s; }
.ios-spinner div:nth-child(8) { transform: translate(-50%, 8px) rotate(210deg); animation-delay: -0.333s; }
.ios-spinner div:nth-child(9) { transform: translate(-50%, 8px) rotate(240deg); animation-delay: -0.25s; }
.ios-spinner div:nth-child(10) { transform: translate(-50%, 8px) rotate(270deg); animation-delay: -0.166s; }
.ios-spinner div:nth-child(11) { transform: translate(-50%, 8px) rotate(300deg); animation-delay: -0.083s; }
.ios-spinner div:nth-child(12) { transform: translate(-50%, 8px) rotate(330deg); animation-delay: 0s; }

@keyframes ios-spin {
    0% { opacity: 1; }
    100% { opacity: 0.15; }
}
