* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.25);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --card-border: rgba(15, 23, 42, 0.06);
    --text: #0f172a;
    --text-secondary: #475569;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 40px -10px rgba(15, 23, 42, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
}

/* ====================== */
/* Top Navigation Bar     */
/* ====================== */
.site-wrapper {
    min-height: 100vh;
}

.top-nav {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.brand-logo {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
}

.brand-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #e2e8f0;
}

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

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    text-decoration: none;
    color: #94a3b8;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-tab svg {
    width: 18px;
    height: 18px;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    color: white;
    background: rgba(59, 130, 246, 0.3);
    border-bottom: 2px solid #3b82f6;
}

.nav-user {
    display: flex;
    align-items: center;
}

.nav-user .auth-links {
    display: flex;
    gap: 10px;
}

.nav-user .auth-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-user .auth-link.login {
    color: #e2e8f0;
}

.nav-user .auth-link.login:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-user .auth-link.register {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.nav-user .auth-link.register:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.nav-user .user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.nav-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-user .logout-btn {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-user .logout-btn:hover {
    background: rgba(239, 68, 68, 0.4);
    color: white;
}

/* ====================== */
/* Quick Guide Section    */
/* ====================== */
.quick-guide {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.quick-guide h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.guide-steps {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.guide-step {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.guide-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.guide-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.guide-content h4 {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.guide-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.guide-arrow {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.5rem;
    padding-top: 1rem;
}

/* Code Preview */
.code-preview {
    margin-top: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.code-header {
    background: #1e293b;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
}

.code-lang {
    color: #64748b;
    font-size: 0.75rem;
}

.code-preview pre {
    background: #0f172a;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
}

.code-preview code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.code-include { color: #c084fc; }
.code-string { color: #a5f3fc; }
.code-keyword { color: #f472b6; }
.code-function { color: #fbbf24; }
.code-type { color: #34d399; }
.code-comment { color: #64748b; font-style: italic; }
.code-number { color: #fbbf24; }

/* Download Info */
.download-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.download-info code {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--primary);
}

.download-notice,
.single-machine-notice {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    color: var(--text);
}

.download-notice strong,
.single-machine-notice strong {
    color: #b45309;
}

/* ====================== */
/* Usage Guide Page       */
/* ====================== */
.guide-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.guide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.guide-header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.guide-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.guide-section h2 {
    font-size: 1.6rem;
    color: var(--text);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
}

/* Workflow Diagram */
.workflow-diagram {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 150px;
    max-width: 180px;
}

.workflow-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.workflow-content h3 {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.workflow-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.workflow-arrow {
    display: flex;
    align-items: center;
    color: var(--primary);
    padding: 1rem 0;
}

.workflow-arrow svg {
    width: 32px;
    height: 32px;
}

/* Guide Cards */
.guide-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.guide-card h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 1rem;
}

.guide-card h4 {
    font-size: 1rem;
    color: var(--text);
    margin: 1rem 0 0.5rem 0;
}

.guide-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.guide-card ol, .guide-card ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.guide-card li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.guide-card li strong {
    color: var(--text);
}

/* Code Blocks in Guide */
.code-block {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.code-block .code-header {
    background: #1e293b;
    padding: 0.5rem 1rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

.code-block pre {
    background: #0f172a;
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Tip Box */
.tip-box {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 8px 8px 0;
}

.tip-box strong {
    color: var(--primary);
}

/* Model Types Grid */
.model-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.model-type {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.model-type h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.model-type p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.model-type code {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* File Structure */
.file-structure {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.file-structure pre {
    margin: 0;
    color: #e2e8f0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
}

/* API Table */
.api-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.api-table th, .api-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.api-table th {
    background: var(--bg);
    color: var(--text);
    font-weight: 600;
}

.api-table td code {
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* Requirements List */
.requirements-list {
    list-style: none;
    padding: 0;
}

.requirements-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.requirements-list li:last-child {
    border-bottom: none;
}

/* FAQ Card */
.faq-card {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fcd34d;
}

.faq-card h4 {
    color: #92400e;
}

.faq-card p {
    color: #78350f;
}

.faq-card code {
    background: rgba(146, 64, 14, 0.1);
    color: #92400e;
}

/* Compile Steps */
.compile-steps {
    padding-left: 1.5rem;
}

.compile-steps li {
    margin-bottom: 1rem;
}

.compile-steps li ul {
    margin-top: 0.5rem;
}

/* Guide Footer */
.guide-footer {
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.guide-footer a {
    color: var(--primary);
    text-decoration: none;
}

.guide-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-tabs {
        display: none;
    }
    
    .workflow-diagram {
        flex-direction: column;
        align-items: center;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .guide-steps {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }
    
    .guide-step {
        width: 100%;
        max-width: 100%;
        min-height: 80px;
        padding: 1rem;
        background: #f8fafc;
        border-radius: 10px;
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 0.75rem;
    }
    
    .guide-icon {
        flex-shrink: 0;
        margin: 0;
    }
    
    .guide-content {
        text-align: left;
        width: 100%;
    }
    
    .guide-content h4,
    .guide-content p {
        text-align: left;
    }
    
    .guide-arrow {
        display: none;
    }
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 64px);
}

header {
    margin-bottom: 3rem;
}

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

.header-title {
    text-align: left;
}

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

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.logout-btn {
    padding: 8px 16px;
    background: var(--border);
    color: var(--text);
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.logout-btn:hover {
    background: var(--text-secondary);
    color: white;
}

/* Auth Links */
.auth-links {
    display: flex;
    gap: 12px;
}

.auth-link {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.auth-link.login {
    color: var(--primary);
    background: transparent;
}

.auth-link.login:hover {
    background: rgba(37, 99, 235, 0.1);
}

.auth-link.register {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.auth-link.register:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-title {
        text-align: center;
    }
}

/* Auto Config Info */
.auto-config-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-banner {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.info-banner svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--primary);
}

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

.info-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.config-preview {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem;
    border: 2px solid var(--success);
}

.config-preview h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-preview h4::before {
    content: "✓";
    font-weight: bold;
}

.config-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.config-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

@media (max-width: 480px) {
    .config-items {
        grid-template-columns: 1fr;
    }
}

.form-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
}

/* Select / dropdown fields */
.select-field {
    margin-bottom: 0.75rem;
}
.select-field:last-child {
    margin-bottom: 0;
}
.select-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.1rem;
    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(37, 99, 235, 0.15);
}

.form-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

/* Target Cards */
.target-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

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

.target-card input {
    position: absolute;
    opacity: 0;
}

.target-card .card-content {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.2s;
}

.target-card input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

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

.target-card.recommended .badge {
    position: absolute;
    top: -8px;
    right: 10px;
    background: var(--success);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.target-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.target-card .chip {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.target-card .arch {
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

/* Precision Cards */
.precision-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.precision-card {
    cursor: pointer;
}

.precision-card input {
    position: absolute;
    opacity: 0;
}

.precision-card .card-content {
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s;
}

.precision-card input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

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

.precision-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.precision-card p {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Input Shape */
.shape-inputs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.shape-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.shape-item label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.shape-item input {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.shape-item input:focus {
    outline: none;
    border-color: var(--primary);
}

.hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

/* Input/Output Config */
.input-config-group,
.output-config-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-row h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.format-desc {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Monaco', 'Menlo', monospace;
    resize: vertical;
    transition: border-color 0.2s;
}

.format-desc:focus {
    outline: none;
    border-color: var(--primary);
}

.preprocess-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.preprocess-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preprocess-item label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.preprocess-item input {
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: 'Monaco', 'Menlo', monospace;
    transition: border-color 0.2s;
}

.preprocess-item input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Output Type Grid */
.output-type-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.output-type-card {
    cursor: pointer;
}

.output-type-card input {
    position: absolute;
    opacity: 0;
}

.output-type-card .card-content {
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    transition: all 0.2s;
}

.output-type-card input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.05);
}

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

.output-type-card h5 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.output-type-card p {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .preprocess-inputs {
        grid-template-columns: 1fr;
    }
    
    .output-type-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.02);
}

.upload-area.has-file {
    border-style: solid;
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-text {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.remove-file {
    background: var(--error);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

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

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Progress Section */
.progress-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-around;
}

.progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.progress-steps .step.active {
    opacity: 1;
}

.progress-steps .step.completed {
    opacity: 1;
}

.progress-steps .step.completed .step-icon {
    background: var(--success);
}

.step-icon {
    width: 32px;
    height: 32px;
    background: var(--border);
    color: var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-steps .step.active .step-icon {
    background: var(--primary);
    color: white;
}

.progress-steps .step span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Download Section */
.download-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--success);
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.download-section h2 {
    color: var(--success);
    margin-bottom: 0.5rem;
}

.download-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--success);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.2s;
}

.download-btn:hover {
    transform: translateY(-2px);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

.new-compile-btn {
    display: block;
    margin: 1rem auto 0;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Error Section */
.error-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
}

.error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--error);
}

.error-icon svg {
    width: 100%;
    height: 100%;
}

.error-section h2 {
    color: var(--error);
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.retry-btn {
    padding: 0.75rem 2rem;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.retry-btn:hover {
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .target-grid {
        grid-template-columns: 1fr;
    }
    
    .precision-grid {
        grid-template-columns: 1fr;
    }
    
    .shape-inputs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

/* ============================================
   DOCUMENTATION PAGE STYLES
   ============================================ */

.docs-container {
    min-height: 100vh;
    background: var(--bg);
}

.docs-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.docs-header .header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.docs-header h1 {
    font-size: 1.75rem;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.docs-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.nav-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.1);
}

.docs-layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

.docs-sidebar {
    width: 250px;
    padding: 2rem 1.5rem;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
    flex-shrink: 0;
}

.docs-nav {
    list-style: none;
}

.docs-nav li {
    margin-bottom: 0.5rem;
}

.docs-nav a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.docs-nav a:hover {
    color: var(--text);
    background: rgba(37, 99, 235, 0.05);
}

.docs-nav a.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    border-left-color: var(--primary);
    font-weight: 500;
}

.docs-content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
}

.docs-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.docs-section h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.docs-section h3 {
    font-size: 1.25rem;
    color: var(--text);
    margin: 2rem 0 1rem;
}

.docs-section h4 {
    font-size: 1rem;
    color: var(--text);
    margin: 1.5rem 0 0.75rem;
}

.docs-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.docs-section ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.docs-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Steps */
.steps {
    margin-top: 2rem;
}

.docs-section .steps .step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.docs-section .steps .step-number {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.docs-section .steps .step-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.docs-section .steps .step-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Info and Warning Boxes */
.info-box, .warning-box {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box {
    background: rgba(37, 99, 235, 0.1);
    border-left: 4px solid var(--primary);
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
}

.info-box strong, .warning-box strong {
    display: block;
    margin-bottom: 0.5rem;
}

.info-box pre, .warning-box pre {
    margin: 0.75rem 0 0;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.75rem;
    border-radius: 4px;
    overflow-x: auto;
}

.info-box code, .warning-box code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
}

.docs-prereq-box {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.docs-prereq-block {
    display: block;
}
.docs-prereq-block strong {
    display: block;
    margin-bottom: 0.5rem;
}
.docs-prereq-box .docs-prereq-block p {
    margin: 0.5rem 0 0;
}
.docs-prereq-box .docs-prereq-block p:first-of-type {
    margin-top: 0;
}
.docs-prereq-box .docs-prereq-block pre {
    margin: 0.5rem 0 0;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}
.docs-prereq-box .docs-prereq-block pre code {
    white-space: pre;
    display: block;
    min-width: min-content;
}
.docs-prereq-box .docs-prereq-note {
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.docs-table th,
.docs-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.docs-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.docs-table td {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.docs-table tr:last-child td {
    border-bottom: none;
}

.docs-table tr.recommended,
.docs-table tr.highlight {
    background: rgba(16, 185, 129, 0.1);
}

.docs-table tr.recommended td,
.docs-table tr.highlight td {
    color: var(--text);
}

/* Category Overview Table */
.docs-table.category-overview {
    margin: 2rem 0;
}

.docs-table.category-overview td:first-child,
.docs-table.category-overview td:nth-child(3) {
    text-align: center;
    font-weight: 600;
}

.docs-table.category-overview td:first-child {
    background: var(--primary);
    color: white;
    width: 40px;
}

.docs-table.category-overview td:nth-child(2) {
    font-weight: 600;
    color: var(--text);
}

.docs-table.category-overview tfoot {
    background: var(--bg);
    font-weight: 600;
}

.docs-table.category-overview tfoot td {
    border-top: 2px solid var(--primary);
    padding: 1rem;
}

.docs-table code {
    background: var(--bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
}

/* Format Grid */
.format-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.format-card {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.format-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.format-card .extensions {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.format-card p {
    margin: 0;
    font-size: 0.875rem;
}

/* Precision Comparison */
.precision-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.docs-section .precision-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    position: relative;
}

.docs-section .precision-card.recommended {
    border: 2px solid var(--primary);
}

.docs-section .precision-card .badge {
    position: absolute;
    top: -10px;
    right: 10px;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.docs-section .precision-card h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
}

.precision-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.docs-section .precision-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.docs-section .precision-card li {
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.precision-bar {
    margin-bottom: 0.5rem;
    height: 24px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.precision-bar span {
    display: block;
    height: 100%;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    padding: 0 0.5rem;
    line-height: 24px;
    white-space: nowrap;
}

.precision-bar .accuracy {
    background: linear-gradient(90deg, var(--primary), #8b5cf6);
}

.precision-bar .size {
    background: var(--warning);
}

/* Analysis Features */
.analysis-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.analysis-item {
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.analysis-item h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
}

.analysis-item p {
    margin: 0;
    font-size: 0.875rem;
}

.analysis-item ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
    font-size: 0.875rem;
}

/* File Tree */
.file-tree {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.file-tree code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Code Blocks */
.docs-section pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.docs-section pre code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Inline Code */
.docs-section p code,
.docs-section li code {
    background: var(--bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--primary);
}

/* API Table */
.api-table td:first-child {
    white-space: nowrap;
}

.api-table code {
    color: var(--primary);
}

/* FAQ */
.faq-list {
    margin-top: 1.5rem;
}

.faq-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.faq-item h4 {
    margin: 0 0 0.75rem 0;
    color: var(--text);
    font-size: 1rem;
}

.faq-item p {
    margin: 0;
    font-size: 0.9rem;
}

.faq-item pre {
    margin: 0.75rem 0 0;
}

/* Docs Footer */
.docs-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.docs-footer a {
    color: var(--primary);
}

/* Responsive Docs */
@media (max-width: 1024px) {
    .docs-sidebar {
        display: none;
    }
    
    .docs-content {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .precision-comparison {
        grid-template-columns: 1fr;
    }
    
    .analysis-features {
        grid-template-columns: 1fr;
    }
    
    .format-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .docs-header {
        padding: 1rem;
    }
    
    .docs-header h1 {
        font-size: 1.5rem;
    }
    
    .docs-section h2 {
        font-size: 1.3rem;
    }
    
    .docs-section h3 {
        font-size: 1.1rem;
    }
    
    .docs-section p {
        font-size: 0.9rem;
    }
    
    .docs-content {
        padding: 1rem;
        overflow-x: hidden;
    }
    
    .docs-table {
        font-size: 0.75rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .docs-table th,
    .docs-table td {
        padding: 0.4rem;
        white-space: nowrap;
    }
    
    .docs-section pre {
        font-size: 0.75rem;
        padding: 0.75rem;
        overflow-x: auto;
    }
    
    .docs-section pre code {
        font-size: 0.75rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .feature-card h4 {
        font-size: 0.95rem;
    }
    
    .feature-card p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 0.75rem;
    }
    
    .docs-section {
        margin-bottom: 2rem;
    }
    
    .docs-section h2 {
        font-size: 1.15rem;
        padding-bottom: 0.4rem;
    }
    
    .docs-section h3 {
        font-size: 1rem;
        margin: 1.5rem 0 0.75rem;
    }
    
    .docs-section p,
    .docs-section li {
        font-size: 0.85rem;
    }
    
    .docs-section pre {
        font-size: 0.7rem;
        padding: 0.6rem;
        border-radius: 6px;
    }
    
    .info-box,
    .warning-box {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .steps .step {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .steps .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .steps .step-content h4 {
        font-size: 0.9rem;
    }
    
    .steps .step-content p {
        font-size: 0.8rem;
    }
}

/* ====================== */
/* License Input Section  */
/* ====================== */
.license-config {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.license-input-group {
    margin-bottom: 1.5rem;
}

.license-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.license-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.license-input-wrapper input[type="number"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.license-input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.license-unit {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 1rem;
}

.license-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.license-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-radius: 8px;
    border: 1px solid #93c5fd;
}

.license-info svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.license-info strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.license-info p {
    font-size: 0.9rem;
    color: #1e40af;
    margin: 0;
    line-height: 1.5;
}

/* License Info Grid for Guide Page */
.license-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.license-feature {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 1.25rem;
}

.license-feature h4 {
    color: var(--primary-dark);
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
}

.license-feature p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.license-feature code {
    background: rgba(37, 99, 235, 0.1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ====================== */
/* Thread Count Section   */
/* ====================== */
.thread-config {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.thread-input-group {
    margin-bottom: 1.5rem;
}

.thread-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.thread-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
}

.thread-input-wrapper input[type="number"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.thread-input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.thread-unit {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 1rem;
}

.thread-hint {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.thread-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 8px;
    border: 1px solid #6ee7b7;
}

.thread-info svg {
    width: 24px;
    height: 24px;
    color: #059669;
    flex-shrink: 0;
    margin-top: 2px;
}

.thread-info strong {
    display: block;
    color: #047857;
    margin-bottom: 0.25rem;
}

.thread-info p {
    font-size: 0.9rem;
    color: #065f46;
    margin: 0;
    line-height: 1.5;
}

/* ====================== */
/* New Model Section Styles */
/* ====================== */

/* Hero Box */
.hero-box {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    margin-bottom: 2rem;
    color: white !important;
}

.hero-icon svg {
    width: 64px;
    height: 64px;
    opacity: 0.9;
    stroke: white;
}

.hero-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
}

.hero-content p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95) !important;
}

.hero-content p strong {
    color: white !important;
}

/* Format Chips */
.format-chips {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0 2rem 0;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chip.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.chip.secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.category-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.category-card.featured {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.category-card.wide {
    grid-column: span 3;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #3b82f6;
}

.category-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.category-card.featured .category-number {
    background: #f59e0b;
}

.category-card.wide .category-number {
    background: #3b82f6;
}

.category-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.category-info .examples {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.category-info .io {
    margin: 0.5rem 0 0 0;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Highlight Box */
.highlight-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 12px;
    border: 1px solid #6ee7b7;
    margin: 2rem 0;
}

.highlight-icon svg {
    width: 32px;
    height: 32px;
    color: #059669;
    flex-shrink: 0;
}

.highlight-content h4 {
    margin: 0 0 0.5rem 0;
    color: #047857;
    font-size: 1rem;
}

.highlight-content p {
    margin: 0;
    color: #065f46;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-card.wide {
        grid-column: span 2;
    }
    
    .hero-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card.wide {
        grid-column: span 1;
    }
    
    .format-chips {
        justify-content: center;
    }
}

/* Input Format Grid */
.input-format-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0;
    max-width: 100%;
    overflow: hidden;
}

.input-format-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    transition: all 0.2s;
    min-width: 0;
    overflow: hidden;
}

.input-format-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.format-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.format-header svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.format-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.input-format-card > p {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.code-block.compact {
    margin: 0;
    overflow-x: auto;
}

.code-block.compact pre {
    padding: 0.6rem 0.8rem;
    font-size: 0.7rem;
    white-space: pre;
    overflow-x: auto;
    margin: 0;
}

.code-block.compact pre code {
    font-size: 0.7rem;
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .input-format-grid {
        grid-template-columns: 1fr;
    }
    
    .code-block.compact pre {
        font-size: 0.8rem;
    }
}

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

/* Simple Recommendation Cards */
.simple-recommendation {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.recommendation-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    border: 1px solid #86efac;
}

.rec-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.rec-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.rec-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .simple-recommendation {
        flex-direction: column;
    }
}

/* Auto-tune Simple Flow */
.autotune-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-radius: 12px;
    border: 1px solid #fcd34d;
    margin: 1.5rem 0;
}

.autotune-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
}

.step-content strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
}

.step-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.autotune-arrow {
    font-size: 1.5rem;
    color: #f59e0b;
    font-weight: 700;
}

@media (max-width: 600px) {
    .autotune-simple {
        flex-direction: column;
    }
    
    .autotune-arrow {
        transform: rotate(90deg);
    }
}

/* Auto Analysis Grid */
.auto-analysis-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.analysis-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6d28d9;
    border: 1px solid #c4b5fd;
}

.analysis-chip svg {
    width: 18px;
    height: 18px;
}

/* ====================== */
/* Hero Animation Section */
/* ====================== */

.hero-animation-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    padding: 3rem 2rem;
    margin: 1.5rem 0 2rem 0;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #334155 100%);
    border-radius: 20px;
    border: 1px solid rgba(71, 85, 105, 0.4);
    overflow: hidden;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
}
.hero-animation-section .promo-title {
    background: linear-gradient(135deg, #e0f2fe 0%, #a5f3fc 50%, #67e8f9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-animation-section .promo-subtitle {
    color: #94a3b8;
}
.hero-animation-section .promo-feature-content h4,
.hero-animation-section .promo-feature-content p {
    color: #e2e8f0;
}
.hero-animation-section .promo-feature-content p {
    color: #94a3b8;
}
.hero-animation-section .adaptive-badge {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(6, 182, 212, 0.5);
    color: #e2e8f0;
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.2);
}
.hero-animation-section .adaptive-icon {
    stroke: #22d3ee;
}

.hero-animation-container {
    width: 100%;
    max-width: 900px;
}

.hero-svg {
    width: 100%;
    height: auto;
    min-height: 320px;
    max-height: 380px;
}

/* Neural Network Nodes - Enhanced Animation */
.nn-node-group {
    animation: nodeGroupPulse 2.5s ease-in-out infinite;
}

.nn-node {
    filter: drop-shadow(0 2px 4px rgba(102, 126, 234, 0.3));
}

.node-glow {
    animation: glowPulse 2.5s ease-in-out infinite;
}

.pulse-1, .pulse-1 .node-glow { animation-delay: 0s; }
.pulse-2, .pulse-2 .node-glow { animation-delay: 0.4s; }
.pulse-3, .pulse-3 .node-glow { animation-delay: 0.8s; }

@keyframes nodeGroupPulse {
    0%, 100% {
        opacity: 0.85;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Connection Lines Animation */
.conn-line {
    stroke-dasharray: 5;
    animation: connectionFlow 1.5s linear infinite;
}

@keyframes connectionFlow {
    0% { stroke-dashoffset: 10; }
    100% { stroke-dashoffset: 0; }
}

/* Flow Particles Animation */
.flow-particle {
    animation: particleFlow 2s ease-in-out infinite;
}

.fp-1 { animation-delay: 0s; }
.fp-2 { animation-delay: 0.3s; }
.fp-3 { animation-delay: 0.6s; }
.fp-4 { animation-delay: 0.2s; }
.fp-5 { animation-delay: 0.5s; }
.fp-6 { animation-delay: 0.8s; }

@keyframes particleFlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* Arrow Head Animation */
.arrow-head {
    animation: arrowPulse 1s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Chip Core Animation */
.chip-core {
    animation: chipPulse 3s ease-in-out infinite;
}

@keyframes chipPulse {
    0%, 100% { opacity: 0.95; }
    50% { opacity: 1; }
}

/* Chip Body Glow Animation */
.chip-body {
    animation: chipGlow 2s ease-in-out infinite;
}

@keyframes chipGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.6));
    }
}

/* File Icons Animation */
.file-icon {
    animation: fileAppear 3s ease-in-out infinite;
}

.file-a { animation-delay: 1.2s; }
.file-h { animation-delay: 1.5s; }

@keyframes fileAppear {
    0%, 30% { opacity: 0.5; transform: translateY(5px); }
    50%, 80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0.5; transform: translateY(5px); }
}

/* Device Animation */
.device {
    animation: deviceFadeIn 3s ease-in-out infinite;
}

.device-1 { animation-delay: 1.8s; }
.device-2 { animation-delay: 2.1s; }
.device-3 { animation-delay: 2.4s; }

@keyframes deviceFadeIn {
    0%, 40% { opacity: 0.6; }
    60%, 90% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Status LED Blink Animation */
.status-led {
    animation: ledBlink 1.5s ease-in-out infinite;
}

.power-led {
    animation: powerLedGlow 2s ease-in-out infinite;
}

.blink-1 { animation-delay: 2s; }
.blink-2 { animation-delay: 2.3s; }
.blink-3 { animation-delay: 2.6s; }

@keyframes ledBlink {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 4px currentColor);
    }
}

@keyframes powerLedGlow {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 3px #ef4444);
    }
}

/* ============================================
   ENHANCED WEB ANIMATIONS
   ============================================ */

/* Page Load Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Shimmer/Shine Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Gradient Flow Animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

/* Ripple Effect */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Typing Cursor Blink */
@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Progress Bar Animation */
@keyframes progressShine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Wave Animation */
@keyframes wave {
    0%, 100% {
        d: path("M0,50 Q25,30 50,50 T100,50");
    }
    50% {
        d: path("M0,50 Q25,70 50,50 T100,50");
    }
}

/* Page Elements Animation Classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.6s ease-out forwards;
}

.animate-fadeInScale {
    animation: fadeInScale 0.5s ease-out forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-bounce {
    animation: bounce 2s ease infinite;
}

/* Staggered Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Header Animation */
header {
    animation: fadeInUp 0.6s ease-out;
}

/* Form Sections - Simple transition, no scroll animation */
.form-section {
    opacity: 1;
}

/* Target Option Hover Animation */
.target-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.target-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

.target-option.selected {
    animation: fadeInScale 0.3s ease-out;
}

/* Precision Option Hover Animation */
.precision-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.precision-option:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.15);
}

/* Upload Area Pulse Animation */
.upload-area {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.upload-area:hover::before {
    width: 400px;
    height: 400px;
}

.upload-area:hover {
    transform: scale(1.01);
}

/* Upload Icon Float Animation */
.upload-icon {
    animation: float 3s ease-in-out infinite;
}

/* Button Ripple Effect */
.submit-btn,
.download-btn,
.cta-primary {
    position: relative;
    overflow: hidden;
}

.submit-btn::after,
.download-btn::after,
.cta-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.submit-btn:hover::after,
.download-btn:hover::after,
.cta-primary:hover::after {
    animation: ripple 1s ease-out;
}

/* Guide Steps - No animation that causes overlap */
.guide-step {
    opacity: 1;
}

.guide-arrow {
    transition: transform 0.3s ease;
}

/* Progress Steps Animation */
.progress-step {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.active {
    animation: fadeInScale 0.4s ease-out;
}

.progress-step.completed .step-icon {
    animation: bounce 0.6s ease;
}

/* Progress Bar Shine Effect */
.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShine 2s linear infinite;
}

/* Download Section Animation */
.download-section.show {
    animation: fadeInScale 0.5s ease-out;
}

/* Result Animation */
.result-section {
    animation: fadeInUp 0.5s ease-out;
}

/* Navbar Links Hover Effect */
.nav-tab {
    position: relative;
    transition: all 0.3s ease;
}

.nav-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tab:hover::after,
.nav-tab.active::after {
    width: 80%;
}

/* Card Hover Effects */
.feature-card,
.input-format-card,
.category-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover,
.input-format-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Hero Animation Section Entrance */
.hero-animation-section {
    animation: fadeInUp 0.8s ease-out;
}

/* SVG Animation Enhanced - Data Flow Particles */
.data-flow-line {
    stroke-dasharray: 8 4;
    animation: dataFlowMove 1s linear infinite;
}

@keyframes dataFlowMove {
    0% { stroke-dashoffset: 12; }
    100% { stroke-dashoffset: 0; }
}

/* Neural Network Connection Pulse */
.nn-connection {
    animation: connectionPulse 2s ease-in-out infinite;
}

@keyframes connectionPulse {
    0%, 100% {
        stroke-opacity: 0.3;
        stroke-width: 1;
    }
    50% {
        stroke-opacity: 0.7;
        stroke-width: 2;
    }
}

/* Background Data Streams Animation */
.bg-stream {
    stroke-dasharray: 10 5;
    animation: streamFlow 3s linear infinite;
}

.stream-1 { animation-delay: 0s; }
.stream-2 { animation-delay: 1s; }
.stream-3 { animation-delay: 2s; }

@keyframes streamFlow {
    0% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -30; }
}

/* Floating Background Particles */
.float-particle {
    animation: floatParticle 8s ease-in-out infinite;
}

.fp-bg-1 { animation-delay: 0s; animation-duration: 7s; }
.fp-bg-2 { animation-delay: 1s; animation-duration: 9s; }
.fp-bg-3 { animation-delay: 2s; animation-duration: 6s; }
.fp-bg-4 { animation-delay: 0.5s; animation-duration: 8s; }
.fp-bg-5 { animation-delay: 1.5s; animation-duration: 7.5s; }
.fp-bg-6 { animation-delay: 2.5s; animation-duration: 8.5s; }

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0) translateX(0);
        opacity: 0.3;
    }
    25% {
        transform: translateY(-20px) translateX(10px);
        opacity: 0.5;
    }
    50% {
        transform: translateY(-10px) translateX(-5px);
        opacity: 0.4;
    }
    75% {
        transform: translateY(-25px) translateX(15px);
        opacity: 0.5;
    }
}

/* Enhanced Flow Particles */
.fp-4 { animation-delay: 0.15s; }
.fp-5 { animation-delay: 0.45s; }
.fp-6 { animation-delay: 0.75s; }

/* Connection Lines Animation */
.conn-line {
    stroke-dasharray: 4 2;
    animation: connLineFlow 1.5s linear infinite;
}

@keyframes connLineFlow {
    0% { stroke-dashoffset: 6; }
    100% { stroke-dashoffset: 0; }
}

/* Chip Circuit Animation */
.chip-circuits path,
.chip-circuits line {
    stroke-dasharray: 3 2;
    animation: circuitPulse 2s linear infinite;
}

@keyframes circuitPulse {
    0% { stroke-dashoffset: 5; stroke-opacity: 0.5; }
    50% { stroke-dashoffset: 0; stroke-opacity: 0.9; }
    100% { stroke-dashoffset: -5; stroke-opacity: 0.5; }
}

/* Compiler Processing Animation */
.compiler-processing {
    animation: processingGlow 1.5s ease-in-out infinite;
}

@keyframes processingGlow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.8));
    }
}

/* Quick Guide Arrows - Simple transition */
.quick-guide .guide-arrow {
    transition: opacity 0.3s ease;
}

.quick-guide .guide-arrow:hover {
    opacity: 0.7;
}

/* Error Section Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.error-section.show {
    animation: shake 0.5s ease-in-out, fadeInScale 0.5s ease-out;
}

/* Success Checkmark Animation */
@keyframes checkmark {
    0% {
        stroke-dashoffset: 100;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.success-checkmark {
    stroke-dasharray: 100;
    animation: checkmark 0.8s ease-out forwards;
}

/* Drawer Menu Slide Animation */
.mobile-drawer {
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-link {
    transition: all 0.2s ease;
}

.drawer-link:hover {
    transform: translateX(5px);
}

/* Scrollbar Styling with Animation */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a6fd6, #6a4190);
}

/* Input Focus Animation */
input:focus,
select:focus {
    animation: inputFocus 0.3s ease-out;
}

@keyframes inputFocus {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    100% {
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }
}

/* Tooltip Animation */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 6px 12px;
    background: #1e293b;
    color: white;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* Loading Skeleton Animation */
@keyframes skeleton {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Text Gradient Animation */
.animated-gradient-text {
    background: linear-gradient(
        90deg,
        #667eea,
        #764ba2,
        #f59e0b,
        #10b981,
        #667eea
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite;
}

/* Notification Badge Pulse */
.notification-badge {
    animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Hero Promo Content */
.hero-promo {
    width: 100%;
    max-width: 700px;
    text-align: center;
}

.promo-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

/* Device-adaptive optimization badge */
.promo-adaptive {
    margin-bottom: 1.5rem;
}
.adaptive-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    box-shadow: 0 0 20px var(--accent-glow);
}
.adaptive-icon {
    width: 18px;
    height: 18px;
    stroke: var(--accent);
    flex-shrink: 0;
}

/* Promo Features */
.promo-features {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.promo-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 200px;
    gap: 0.75rem;
}

.promo-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    flex-shrink: 0;
}

.promo-feature-icon svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.promo-feature-content h4 {
    margin: 0 0 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.promo-feature-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* CTA Buttons */
.promo-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    background: white;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: 2px solid #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: #667eea;
    color: white;
}

/* Responsive - Hero Animation */
@media (max-width: 1024px) {
    .hero-animation-container {
        max-width: 700px;
    }
    
    .promo-features {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-animation-section {
        padding: 1.5rem 1rem;
        margin: 1rem 0 1.5rem 0;
        text-align: center;
    }
    
    .adaptive-badge {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
    
    .hero-animation-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    .hero-svg {
        min-height: 180px;
        max-height: 220px;
        width: 100%;
        margin: 0 auto;
    }
    
    .hero-promo {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }
    
    .promo-title {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .promo-subtitle {
        font-size: 0.9rem;
        text-align: center;
    }
    
    .promo-features {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.75rem;
    }
    
    .promo-feature {
        max-width: 100%;
        width: 100%;
        min-height: 90px;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        display: flex;
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 1rem;
    }
    
    .promo-feature-icon {
        flex-shrink: 0;
    }
    
    .promo-feature-content {
        text-align: left;
    }
    
    .promo-cta {
        width: 100%;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-animation-section {
        padding: 1rem 0.75rem;
    }
    
    .hero-svg {
        min-height: 150px;
        max-height: 180px;
    }
    
    .promo-title {
        font-size: 1.15rem;
    }
    
    .promo-subtitle {
        font-size: 0.85rem;
    }
    
    .promo-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    
    .cta-primary,
    .cta-secondary {
        width: 100%;
        text-align: center;
        padding: 0.75rem 1rem;
    }
    
    .promo-feature {
        padding: 0.5rem;
    }
    
    .promo-feature-icon {
        width: 36px;
        height: 36px;
    }
    
    .promo-feature-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   MOBILE HAMBURGER MENU
   ============================================ */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: white;
    order: -1;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    right: auto;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    box-shadow: 6px 0 30px rgba(0, 0, 0, 0.25);
    transition: left 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.mobile-drawer.open {
    left: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: none;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.drawer-header span {
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.drawer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.drawer-nav {
    padding: 1rem 0.75rem;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: #1e293b;
    text-decoration: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.drawer-link svg {
    width: 22px;
    height: 22px;
    color: #64748b;
}

.drawer-link:hover {
    background: #f1f5f9;
}

.drawer-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
}

.drawer-link.active svg {
    color: white;
}

.drawer-link.logout {
    color: #ef4444;
    border-bottom: none;
}

.drawer-link.logout:hover {
    background: #fef2f2;
}

.drawer-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 1rem 0.5rem;
}

.drawer-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: #475569;
    font-size: 0.95rem;
    font-weight: 500;
    background: #f8fafc;
    border-radius: 10px;
    margin: 0 0.75rem 0.5rem 0.75rem;
}

.drawer-user .user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-tabs {
        display: none !important;
    }
    
    .nav-container {
        padding: 0;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE FIXES
   ============================================ */

/* Global mobile text overflow prevention */
@media (max-width: 768px) {
    html {
        overflow-x: hidden;
    }
    
    body {
        overflow-x: hidden;
        width: 100%;
    }
    
    .container {
        max-width: 100%;
        padding: 1rem;
        overflow-x: hidden;
    }
    
    /* Navigation mobile fixes */
    .top-nav {
        padding: 0 1rem;
    }
    
    .nav-brand a {
        font-size: 0.9rem;
    }
    
    .nav-brand span {
        display: none;
    }
    
    .auth-links {
        gap: 0.5rem;
    }
    
    .auth-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    /* Header mobile fixes - centered */
    header {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .header-title {
        text-align: center;
        width: 100%;
    }
    
    header h1 {
        font-size: 1.5rem;
        word-break: break-word;
        text-align: center;
    }
    
    .subtitle {
        font-size: 0.9rem;
        text-align: center;
    }
    
    /* All sections centered on mobile */
    .form-section {
        text-align: center;
    }
    
    .form-section h2 {
        justify-content: center;
        text-align: center;
    }
    
    /* Upload area centered */
    .upload-area {
        text-align: center;
    }
    
    .upload-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .upload-icon {
        margin: 0 auto 1rem auto;
    }
    
    /* Target and precision grids centered */
    .target-grid,
    .precision-grid {
        justify-items: center;
    }
    
    .target-option,
    .precision-option {
        text-align: center;
    }
    
    /* Config sections centered */
    .license-config,
    .thread-config {
        text-align: center;
    }
    
    .license-config label,
    .thread-config label {
        display: block;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .license-config input,
    .thread-config input,
    .license-config select,
    .thread-config select {
        text-align: center;
    }
    
    /* Code blocks must be LEFT aligned, not centered */
    .code-block,
    .code-block pre,
    .code-block code,
    pre,
    code,
    .docs-section pre,
    .docs-section code,
    .api-table,
    .docs-table {
        text-align: left !important;
    }
    
    .code-block pre {
        text-align: left !important;
        padding: 0.75rem;
    }
    
    /* Form sections mobile */
    .form-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .form-section h2 {
        font-size: 1rem;
        flex-wrap: wrap;
    }
    
    .step-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }
    
    /* Target grid mobile */
    .target-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .target-option {
        padding: 0.75rem;
    }
    
    .target-option .target-name {
        font-size: 0.9rem;
    }
    
    .target-option .target-info {
        font-size: 0.75rem;
    }
    
    /* Precision grid mobile */
    .precision-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    .precision-option {
        padding: 0.75rem;
    }
    
    /* Upload area mobile */
    .upload-area {
        padding: 1.5rem 1rem;
    }
    
    .upload-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .upload-text {
        font-size: 0.9rem;
    }
    
    .upload-hint {
        font-size: 0.75rem;
    }
    
    /* Guide steps mobile */
    .quick-guide {
        padding: 1rem;
        text-align: center;
    }
    
    .quick-guide h3 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .guide-steps {
        gap: 0.75rem;
        align-items: center;
    }
    
    .guide-step {
        padding: 0.75rem;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .guide-icon {
        margin: 0 auto 0.5rem auto;
    }
    
    .guide-content {
        text-align: center;
    }
    
    .guide-content h4 {
        font-size: 0.85rem;
        text-align: center;
    }
    
    .guide-content p {
        text-align: center;
    }
    
    .guide-arrow {
        margin: 0.25rem 0;
    }
    
    .guide-content p {
        font-size: 0.75rem;
    }
    
    .guide-arrow {
        font-size: 1.2rem;
        padding: 0.25rem;
    }
    
    /* Config inputs mobile */
    .license-config,
    .thread-config {
        padding: 1rem;
    }
    
    .license-config label,
    .thread-config label {
        font-size: 0.9rem;
    }
    
    .license-config input,
    .thread-config input,
    .license-config select,
    .thread-config select {
        font-size: 16px; /* Prevent iOS zoom */
        padding: 0.6rem;
    }
    
    /* Progress section mobile */
    .progress-section {
        padding: 1rem;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .progress-step {
        padding: 0.5rem;
    }
    
    /* Result section mobile */
    .result-section {
        padding: 1rem;
    }
    
    .download-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* User menu mobile */
    .user-menu {
        gap: 0.5rem;
    }
    
    .user-info {
        display: none;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .logout-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .container {
        padding: 0.75rem;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .form-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .form-section h2 {
        font-size: 0.95rem;
        gap: 0.5rem;
    }
    
    /* Table responsive - ensure horizontal scroll */
    .docs-table,
    .api-table,
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
    }
    
    .docs-table th,
    .docs-table td,
    .api-table th,
    .api-table td {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
    
    /* Table wrapper for better scroll */
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem 0;
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    
    .table-wrapper .docs-table,
    .table-wrapper .api-table {
        margin: 0;
        border-radius: 0;
    }
    
    /* Code blocks mobile */
    .code-block,
    pre,
    code {
        font-size: 0.75rem !important;
        overflow-x: auto;
        max-width: 100%;
    }
    
    .code-block pre {
        padding: 0.75rem;
    }
    
    /* Hero section extra small */
    .hero-animation-section {
        padding: 1rem 0.75rem;
        margin: 0.75rem 0 1rem 0;
    }
    
    .promo-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .promo-subtitle {
        font-size: 0.85rem;
    }
    
    .promo-feature-content h4 {
        font-size: 0.9rem;
    }
    
    .promo-feature-content p {
        font-size: 0.8rem;
    }
    
    /* Buttons mobile */
    .cta-primary,
    .cta-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Form inputs */
    select,
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"] {
        font-size: 16px !important; /* Prevent iOS zoom on focus */
    }
}

/* ============================================
   ADDITIONAL PAGE ANIMATIONS
   ============================================ */

/* Documentation Page - No animation overlap */
.docs-section {
    opacity: 1;
}

/* Hero Box Animation */
.hero-box {
    position: relative;
    overflow: hidden;
}

.hero-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: heroShine 3s ease-in-out infinite;
}

@keyframes heroShine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Category Card Hover Effects */
.category-card {
    position: relative;
    overflow: hidden;
}

.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.category-card:hover::after {
    transform: scaleX(1);
}

/* Code Block Animation */
.code-block {
    position: relative;
    overflow: hidden;
}

.code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    animation: codeShine 4s ease-in-out infinite;
}

@keyframes codeShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

/* Info Box Icon Pulse */
.info-box svg,
.warning-box svg {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Step Number Animation */
.step-number {
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: stepRing 2s ease-out infinite;
}

@keyframes stepRing {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Table Row Hover Animation */
.docs-table tbody tr {
    transition: all 0.3s ease;
}

.docs-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
}

/* Badge Animation */
.badge {
    animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Link Hover Underline Animation */
a:not(.nav-tab):not(.drawer-link):not(.auth-link):not(.cta-primary):not(.cta-secondary) {
    position: relative;
    text-decoration: none;
}

a:not(.nav-tab):not(.drawer-link):not(.auth-link):not(.cta-primary):not(.cta-secondary)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

a:not(.nav-tab):not(.drawer-link):not(.auth-link):not(.cta-primary):not(.cta-secondary):hover::after {
    width: 100%;
}

/* Logo Animation */
.brand-logo {
    display: inline-block;
    animation: logoGlow 3s ease-in-out infinite;
}

@keyframes logoGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    }
    50% {
        text-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    }
}

/* Auth Card Animation */
.auth-card {
    animation: authCardEnter 0.5s ease-out;
}

@keyframes authCardEnter {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Form Input Label Animation */
.form-group label {
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary);
}

/* Select Dropdown Arrow Animation */
select {
    transition: all 0.3s ease;
}

select:focus {
    background-position: right 0.75rem top 60%;
}

/* Download Button Success Animation */
.download-btn.success {
    animation: downloadSuccess 0.5s ease-out;
}

@keyframes downloadSuccess {
    0% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Loading State Shimmer */
.loading-shimmer {
    position: relative;
    overflow: hidden;
}

.loading-shimmer::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: shimmerMove 1.5s infinite;
}

@keyframes shimmerMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Page Transition */
.page-transition {
    animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Notification Toast Animation */
.toast {
    animation: toastSlideIn 0.4s ease-out;
}

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

.toast.hide {
    animation: toastSlideOut 0.3s ease-in forwards;
}

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

/* Checkbox/Radio Animation */
input[type="checkbox"],
input[type="radio"] {
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    animation: checkPop 0.3s ease;
}

@keyframes checkPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
