@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700&family=Space+Grotesk:wght@700&display=swap');

body { font-family: 'Inter', sans-serif; }
.font-outfit { font-family: 'Outfit', sans-serif; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.dark ::-webkit-scrollbar-thumb { background: #475569; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.dark ::-webkit-scrollbar-thumb:hover { background: #64748b; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 15px rgba(99,102,241,0.15); } 50% { box-shadow: 0 0 30px rgba(99,102,241,0.3); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }

/* Header Global GRIMONT */
.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); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08); 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: 1152px; 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: #60a5fa; 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;
}

/* Template Cards */
.template-card {
    cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(148, 163, 184, 0.2); position: relative; overflow: hidden;
}
.template-card::before {
    content: ''; position: absolute; inset: 0; opacity: 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.08));
    transition: opacity 0.3s ease;
}
.template-card:hover::before { opacity: 1; }
.template-card:hover {
    transform: translateY(-4px); border-color: rgba(99,102,241,0.4);
    box-shadow: 0 12px 40px rgba(99,102,241,0.12);
}
.template-card.active {
    border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,0.2), 0 8px 30px rgba(99,102,241,0.15);
}
.dark .template-card { border-color: rgba(71, 85, 105, 0.5); }
.dark .template-card:hover { border-color: rgba(129, 140, 248, 0.5); }
.dark .template-card.active { border-color: #818cf8; box-shadow: 0 0 0 2px rgba(129,140,248,0.2), 0 8px 30px rgba(99,102,241,0.15); }

/* Glass Card */
.glass-card {
    background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.3); border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.dark .glass-card {
    background: rgba(30,41,59,0.6); border-color: rgba(71,85,105,0.4);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* Section Cards in report */
.report-section {
    background: white; border-radius: 1rem; padding: 1.5rem 2rem;
    border: 1px solid #e2e8f0; transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.report-section:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.dark .report-section { background: #1e293b; border-color: #334155; }
.dark .report-section:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.report-section h3 {
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.25rem;
    margin-bottom: 1rem; padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0; display: flex; align-items: center; gap: 0.5rem;
}
.dark .report-section h3 { border-bottom-color: #334155; }

/* Competitor Cards */
.competitor-card {
    border-radius: 0.75rem; padding: 1.25rem; border: 1px solid #e2e8f0;
    transition: all 0.25s ease; background: #f8fafc;
}
.competitor-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.dark .competitor-card { background: #0f172a; border-color: #334155; }
.dark .competitor-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

/* Tables */
.benchmark-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.benchmark-table thead th {
    background: #f1f5f9; font-weight: 600; padding: 0.75rem 1rem;
    text-align: left; border-bottom: 2px solid #e2e8f0;
    position: sticky; top: 0; z-index: 1;
}
.dark .benchmark-table thead th { background: #1e293b; border-bottom-color: #475569; color: #e2e8f0; }
.benchmark-table tbody td { padding: 0.75rem 1rem; border-bottom: 1px solid #f1f5f9; }
.dark .benchmark-table tbody td { border-bottom-color: #1e293b; }
.benchmark-table tbody tr:hover td { background: rgba(99,102,241,0.04); }
.dark .benchmark-table tbody tr:hover td { background: rgba(99,102,241,0.08); }
.benchmark-table .check { color: #10b981; font-weight: 700; }
.benchmark-table .cross { color: #ef4444; }
.table-wrapper { overflow-x: auto; border-radius: 0.75rem; border: 1px solid #e2e8f0; }
.dark .table-wrapper { border-color: #334155; }

/* Badges */
.badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.75rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 500; white-space: nowrap;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.dark .badge-green { background: rgba(22,163,74,0.15); color: #86efac; }
.dark .badge-red { background: rgba(239,68,68,0.15); color: #fca5a5; }
.dark .badge-blue { background: rgba(59,130,246,0.15); color: #93c5fd; }
.dark .badge-amber { background: rgba(245,158,11,0.15); color: #fcd34d; }
.dark .badge-purple { background: rgba(168,85,247,0.15); color: #d8b4fe; }

/* Strength/Weakness indicators */
.strength-bar { height: 6px; border-radius: 3px; background: #e2e8f0; overflow: hidden; }
.dark .strength-bar { background: #334155; }
.strength-bar-fill { height: 100%; border-radius: 3px; transition: width 0.8s ease; }
.strength-high { background: linear-gradient(90deg, #10b981, #34d399); }
.strength-medium { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.strength-low { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Editable sections */
[contenteditable="true"] {
    outline: none; border-radius: 4px; padding: 2px 4px; margin: -2px -4px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
[contenteditable="true"]:hover { background: rgba(99,102,241,0.04); }
[contenteditable="true"]:focus {
    background: rgba(99,102,241,0.06); box-shadow: 0 0 0 2px rgba(99,102,241,0.2);
}
.dark [contenteditable="true"]:hover { background: rgba(129,140,248,0.06); }
.dark [contenteditable="true"]:focus { background: rgba(129,140,248,0.1); box-shadow: 0 0 0 2px rgba(129,140,248,0.2); }

/* Multi-select chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 1rem; border-radius: 9999px; cursor: pointer;
    font-size: 0.875rem; font-weight: 500;
    border: 1px solid #e2e8f0; background: white;
    transition: all 0.2s ease; user-select: none;
}
.chip:hover { border-color: #a5b4fc; background: #eef2ff; }
.chip.selected { background: #6366f1; color: white; border-color: #6366f1; }
.chip.selected:hover { background: #4f46e5; }
.dark .chip { background: #1e293b; border-color: #475569; color: #cbd5e1; }
.dark .chip:hover { border-color: #818cf8; background: rgba(99,102,241,0.1); }
.dark .chip.selected { background: #6366f1; border-color: #6366f1; color: white; }

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 0.5rem;
}
.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}

/* Source link */
.source-link {
    display: inline-flex; align-items: center; gap: 0.375rem;
    color: #6366f1; font-size: 0.8rem; text-decoration: none;
    transition: all 0.2s ease; padding: 0.25rem 0.5rem; border-radius: 0.375rem;
}
.source-link:hover { background: rgba(99,102,241,0.08); text-decoration: underline; }
.dark .source-link { color: #a5b4fc; }
.dark .source-link:hover { background: rgba(129,140,248,0.1); }

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

/* Print Styles */
@media print {
    .grimont-global-header, .no-print { display: none !important; }
    .report-section { break-inside: avoid; }
    body { background: white !important; color: #1e293b !important; }
}

/* Export utilities */
.no-transitions * { transition: none !important; animation: none !important; }

