﻿/* ============================================
   ANALYSE SEO — Design System & Styles
   ============================================ */

/* --- CSS Variables (Light Theme) --- */
:root {
    /* Colors */
    --primary: #6366f1;
    --primary-light: #a5b4fc;
    --primary-dark: #4338ca;
    --accent: #a855f7;
    --accent-light: #c084fc;
    --gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.08) 100%);
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);

    /* Surfaces */
    --bg: #f8f9fc;
    --bg-card: #ffffff;
    --bg-input: #f1f3f9;
    --bg-hover: #eef0f6;
    --bg-toolbar: #f5f6fa;

    /* Text */
    --text: #1e1b4b;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-inverse: #ffffff;

    /* Borders */
    --border: #e5e7eb;
    --border-focus: #6366f1;

    /* Status */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

    /* Radius */
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
    --bg: #0f0d1a;
    --bg-card: #1a1730;
    --bg-input: #252240;
    --bg-hover: #302d50;
    --bg-toolbar: #1f1c35;
    --text: #f1f0ff;
    --text-secondary: #a5a3c0;
    --text-muted: #7c7a9a;
    --text-inverse: #ffffff;
    --border: #2d2a50;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background var(--transition), color var(--transition);
    overflow-x: hidden;
}

/* --- Container --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(248, 249, 252, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(15, 13, 26, 0.85);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: var(--gradient);
    color: white;
}

.logo-text strong {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Theme Toggle */
.theme-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}

.theme-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-icon.moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="dark"] .theme-icon.sun {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="dark"] .theme-icon.moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    padding: 140px 24px 80px;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    opacity: 0.06;
    z-index: -1;
}

[data-theme="dark"] .hero-bg {
    opacity: 0.12;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    animation: heroPulse 15s ease-in-out infinite;
}

@keyframes heroPulse {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-30px, -20px);
    }
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-hero {
    background: var(--gradient);
    color: white;
    padding: 16px 32px;
    font-size: 1rem;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    transform: translateY(-1px);
}

.btn-analyze {
    width: 100%;
    justify-content: center;
    padding: 18px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-download {
    padding: 16px 32px;
}

/* ============================================
   OVERVIEW — Checklist Summary & Tools
   ============================================ */
.overview-section {
    padding: 0 0 60px;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.overview-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

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

.overview-card-tools {
    grid-column: 1 / -1;
}

.overview-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.overview-card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.overview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

.seo-icon {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.geo-icon {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent);
}

.tools-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.overview-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overview-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.overview-list li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--primary);
}

.tools-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.tools-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}

.tool-link:hover {
    border-color: var(--primary);
    background: var(--gradient-soft);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.tool-link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gradient-soft);
    color: var(--primary);
    flex-shrink: 0;
}

.tool-link-content {
    flex: 1;
    min-width: 0;
}

.tool-link-content strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.tool-link-content small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.tool-link-arrow {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all var(--transition);
}

.tool-link:hover .tool-link-arrow {
    color: var(--primary);
    transform: translate(2px, -2px);
}

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

    .overview-card-tools {
        grid-column: auto;
    }
}

/* ============================================
   SECTIONS
   ============================================ */
.main-content {
    padding: 40px 0 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: var(--gradient-soft);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ============================================
   FORM
   ============================================ */
.seo-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-full {
    width: 100%;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.form-label svg {
    color: var(--primary);
    flex-shrink: 0;
}

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

.form-input {
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all var(--transition);
    outline: none;
    width: 100%;
}

.form-input::placeholder {
    color: var(--text-muted);
}

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

.form-textarea {
    resize: vertical;
    min-height: 90px;
}

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

/* Char Counter */
.char-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    padding-top: 4px;
}

.char-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.char-bar-fill {
    display: block;
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary);
    transition: width var(--transition), background var(--transition);
    width: 0%;
}

.char-bar-fill.good {
    background: var(--success);
}

.char-bar-fill.warn {
    background: var(--warning);
}

.char-bar-fill.over {
    background: var(--danger);
}

/* ============================================
   BBCODE EDITOR
   ============================================ */
.bbcode-editor {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--bg-card);
}

.bbcode-editor:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.bbcode-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: var(--bg-toolbar);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 2px;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 6px;
}

.toolbar-spacer {
    flex: 1;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.toolbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.toolbar-btn:active {
    transform: scale(0.95);
}

.toolbar-btn-preview {
    font-weight: 600;
    padding: 0 14px;
    font-size: 0.8rem;
    color: var(--primary);
}

.toolbar-btn-preview.active {
    background: var(--primary);
    color: white;
}

.bbcode-body {
    position: relative;
    min-height: 350px;
}

.bbcode-textarea {
    width: 100%;
    min-height: 350px;
    padding: 20px;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: 'Inter', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    resize: vertical;
    outline: none;
}

.bbcode-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.bbcode-preview {
    position: absolute;
    inset: 0;
    padding: 20px;
    overflow-y: auto;
    background: var(--bg-card);
}

.preview-content h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 24px 0 12px;
    color: var(--text);
}

.preview-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 20px 0 10px;
    color: var(--text);
}

.preview-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 18px 0 8px;
    color: var(--text);
}

.preview-content h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 16px 0 8px;
    color: var(--text);
}

.preview-content h5 {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 14px 0 6px;
    color: var(--text);
}

.preview-content h6 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 12px 0 6px;
    color: var(--text-secondary);
}

.preview-content p {
    margin: 8px 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.preview-content strong {
    font-weight: 700;
    color: var(--text);
}

.preview-content em {
    font-style: italic;
}

.preview-content u {
    text-decoration: underline;
}

.preview-content ul {
    margin: 8px 0;
    padding-left: 24px;
}

.preview-content li {
    margin: 4px 0;
    color: var(--text-secondary);
}

.bbcode-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: var(--bg-toolbar);
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================
   FORM ACTIONS
   ============================================ */
.form-actions {
    padding-top: 16px;
}

/* ============================================
   REPORT SECTION
   ============================================ */
.report-section {
    padding: 80px 0 100px;
    background: var(--bg);
}

/* Score Card */
.score-card {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-soft);
    opacity: 0.5;
}

.score-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.score-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.score-ring-bg {
    fill: none;
    stroke: var(--bg-input);
    stroke-width: 10;
}

.score-ring-fill {
    fill: none;
    stroke: url(#scoreGradient);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.score-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 60%);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.score-info {
    position: relative;
    z-index: 1;
    flex: 1;
}

.score-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.score-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.score-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.score-badge.good {
    background: var(--success-bg);
    color: var(--success);
}

.score-badge.warn {
    background: var(--warning-bg);
    color: var(--warning);
}

.score-badge.bad {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Chart Card */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

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

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
}

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

.chart-container {
    display: flex;
    justify-content: center;
    padding: 8px;
    width: 100%;
    min-height: 300px;
}

.chart-container canvas {
    width: 100% !important;
    height: auto !important;
    max-width: 600px;
}


.btn-download-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px auto 0;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-download-chart:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--gradient-soft);
}

/* Checklist Card */
.checklist-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
    margin-bottom: 32px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.check-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.check-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
}

.check-icon.good {
    background: var(--success-bg);
    color: var(--success);
}

.check-icon.warn {
    background: var(--warning-bg);
    color: var(--warning);
}

.check-icon.bad {
    background: var(--danger-bg);
    color: var(--danger);
}

.check-content {
    flex: 1;
    min-width: 0;
}

.check-title {
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-score {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-input);
    color: var(--text-muted);
    font-weight: 700;
    white-space: nowrap;
}

.check-feedback {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Report Actions */
.report-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 16px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center;
    padding: 32px 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

/* ============================================
   PDF EXPORT HIDDEN CONTENT
   ============================================ */
.pdf-content {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 800px;
    background: white;
    color: #1e1b4b;
    font-family: 'Inter', sans-serif;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.animate-in-delay-1 {
    animation-delay: 0.1s;
}

.animate-in-delay-2 {
    animation-delay: 0.2s;
}

.animate-in-delay-3 {
    animation-delay: 0.3s;
}

.animate-in-delay-4 {
    animation-delay: 0.4s;
}

/* ============================================
   LOADING SPINNER
   ============================================ */
.loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    background: rgba(248, 249, 252, 0.95);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .loading-overlay {
    background: rgba(15, 13, 26, 0.95);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: var(--radius);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

/* ============================================
   URL IMPORT CARD
   ============================================ */
.url-import-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin: 32px 0 60px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.url-import-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
}

.import-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

@media (max-width: 640px) {
    .import-group {
        flex-direction: column;
        align-items: stretch;
    }
}

.btn-import {
    white-space: nowrap;
    min-height: 52px;
}

.import-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
}

.spinner-sm {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@media (max-width: 768px) {
    .hero {
        padding: 120px 20px 60px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .score-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
        gap: 24px;
    }

    .score-badges {
        justify-content: center;
    }

    .checklist-card,
    .chart-card {
        padding: 20px;
    }

    .check-item {
        padding: 14px;
    }

    .report-actions {
        flex-direction: column;
    }

    .report-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .bbcode-toolbar {
        gap: 2px;
        padding: 6px 8px;
    }

    .toolbar-separator {
        display: none;
    }

    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .toolbar-btn {
        min-width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
}

/* ============================================
   PDF EXPORT STYLES
   ============================================ */
.pdf-export-mode .btn-download-chart,
.pdf-export-mode .report-actions,
.pdf-export-mode .btn-download,
.pdf-export-mode .tool-link-arrow,
.pdf-export-mode .section-badge,
.pdf-export-mode .theme-toggle,
.pdf-export-mode .ggh-right {
    display: none !important;
}

.pdf-export-mode .report-section {
    padding: 20px 0 !important;
    background: white !important;
    color: #1e1b4b !important;
}

.pdf-export-mode .container {
    width: 900px !important;
    max-width: none !important;
    min-width: 900px !important;
    margin: 0 auto !important;
    padding: 20px 40px !important;
}


.pdf-export-mode .checklist-card,
.pdf-export-mode .chart-card,
.pdf-export-mode .score-card {
    box-shadow: none !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 24px !important;
    page-break-inside: avoid !important;
    background: white !important;
    color: #1e1b4b !important;
}

/* Fix CSS Grid issues in html2canvas by using Flexbox */
.pdf-export-mode .charts-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px !important;
    justify-content: space-between !important;
}

.pdf-export-mode .chart-card {
    width: calc(50% - 10px) !important;
    flex: 0 0 calc(50% - 10px) !important;
    margin-bottom: 24px !important;
}

.pdf-export-mode .score-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 32px !important;
}

.pdf-export-mode .section-title,
.pdf-export-mode .score-title,
.pdf-export-mode .card-title,
.pdf-export-mode .check-title {
    color: #0f172a !important;
}

.pdf-export-mode .section-desc,
.pdf-export-mode .score-desc,
.pdf-export-mode .check-feedback,
.pdf-export-mode .text-secondary {
    color: #475569 !important;
}

.pdf-export-mode .check-item {
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    page-break-inside: avoid !important;
}


.pdf-export-mode .section-header {
    margin-bottom: 32px !important;
    page-break-after: avoid !important;
}

.pdf-page-break {
    page-break-before: always !important;
    display: block;
    height: 1px;
    background: transparent;
}

.pdf-export-mode .chart-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

.pdf-export-mode .score-card {
    background: #f8fafc !important;
}

.pdf-export-mode .score-value {
    -webkit-text-fill-color: #4f46e5 !important;
    color: #4f46e5 !important;
}


/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
/* Extracted from index.html */

.grimont-global-header {
    width: 100%;
    z-index: 1000;
    position: sticky;
    top: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(15, 23, 42, 0.85); /* Slightly darker for better readability */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* slightly stronger border */
    padding: 14px 0;
    font-family: 'Outfit', 'Inter', sans-serif;
    color: #e2e8f0;
    box-sizing: border-box;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}
.grimont-global-header * {
    box-sizing: border-box;
}
.grimont-global-header .ggh-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ggh-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.ggh-logo-group {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.ggh-logo-group:hover {
    transform: scale(1.02);
}
.ggh-logo-box {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.25);
    flex-shrink: 0;
}
.ggh-logo-text {
    font-family: 'Space Grotesk', monospace;
    font-weight: 800;
    font-size: 1.2rem;
    color: white;
    letter-spacing: 0.05em;
    display: none;
}
.ggh-logo-text span {
    color: #00f2ff;
}
@media (min-width: 640px) {
    .ggh-logo-text { display: block; }
}
.ggh-separator {
    width: 1px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    display: none;
}
@media (min-width: 768px) {
    .ggh-separator { display: block; }
}
.ggh-app-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ggh-app-title-group {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.ggh-app-icon-container {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(30, 41, 59, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #4ade80;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}
.ggh-app-name {
    font-weight: 700;
    color: white;
    font-size: 1.05rem;
    margin: 0;
    padding: 0;
    letter-spacing: 0.02em;
}
.ggh-app-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    max-width: 600px;
    display: none;
    margin: 4px 0 0 0;
    padding: 0;
    line-height: 1.4;
    font-weight: 300;
}
@media (min-width: 1024px) {
    .ggh-app-desc { display: block; }
}
.ggh-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.ggh-right button {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}
.ggh-right button:hover {
    background: rgba(30, 41, 59, 1) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}

