/* ═══════════════════════════════════════════════════════════════════════════
   CaYaDev Site Checker – Theme & Styles
   Colors: #dc2727 (CaYaDev Red), #0a0a0a (bg), #141414 (card), #1e1e1e
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red: #dc2727;
    --red-glow: rgba(220, 39, 39, 0.15);
    --red-dark: #a11d1d;
    --bg: #0a0a0a;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --bg-input: #0e0e0e;
    --border: #1e1e1e;
    --border-light: #2a2a2a;
    --text: #e8e8e8;
    --text-dim: #888888;
    --text-muted: #555555;
    --pass: #22c55e;
    --pass-bg: rgba(34, 197, 94, 0.08);
    --warn: #eab308;
    --warn-bg: rgba(234, 179, 8, 0.08);
    --fail: #ef4444;
    --fail-bg: rgba(239, 68, 68, 0.08);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 2px 20px rgba(0,0,0,0.3);
    --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

/* ── Navbar ────────────────────────────────────────────────────────────── */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.logo-svg { color: #fff; }

.logo-divider {
    color: var(--text-muted);
    font-weight: 200;
    font-size: 20px;
}

.logo-text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    font-family: inherit;
}

.lang-btn:hover {
    border-color: var(--border-light);
    color: var(--text);
    background: var(--bg-card-hover);
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.hero {
    max-width: 700px;
    margin: 0 auto;
    padding: 80px 24px 40px;
    text-align: center;
    position: relative;
}

.hero-glow {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 250px;
    background: radial-gradient(ellipse, var(--red-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero h1 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-dim);
    margin-bottom: 36px;
    position: relative;
    z-index: 1;
}

/* ── Search Box ────────────────────────────────────────────────────────── */

.search-box {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 6px;
    position: relative;
    z-index: 1;
    transition: border-color var(--transition);
}

.search-box:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
}

.input-icon { color: var(--text-muted); flex-shrink: 0; }

#urlInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 16px;
    font-family: inherit;
    padding: 12px 0;
}

#urlInput::placeholder { color: var(--text-muted); }

#checkBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--red);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    white-space: nowrap;
}

#checkBtn:hover { background: var(--red-dark); transform: translateY(-1px); }
#checkBtn:active { transform: translateY(0); }

#checkBtn.loading {
    pointer-events: none;
    opacity: 0.8;
}

#checkBtn.loading .btn-text { display: none; }
#checkBtn.loading .btn-spinner { display: block; animation: spin 1s linear infinite; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Feature Tags ──────────────────────────────────────────────────────── */

.hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    position: relative;
    z-index: 1;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

/* ── Results Area ──────────────────────────────────────────────────────── */

.results-area {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* ── Score Card ────────────────────────────────────────────────────────── */

.score-card {
    display: flex;
    align-items: center;
    gap: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 28px;
    animation: slideInDown 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-ring-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.score-ring { width: 100%; height: 100%; }

.score-fill {
    transition: stroke-dashoffset 2s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.5s ease;
}

.score-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

.score-meta h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 6px;
}

.score-desc {
    font-size: 15px;
    color: var(--text-dim);
    margin-bottom: 4px;
}

.score-summary {
    font-size: 13px;
    color: var(--text-muted);
}

/* Score colors */
.score-excellent .score-fill { stroke: var(--pass); }
.score-good .score-fill { stroke: #84cc16; }
.score-average .score-fill { stroke: var(--warn); }
.score-poor .score-fill { stroke: var(--fail); }

.score-excellent .score-number { color: var(--pass); }
.score-good .score-number { color: #84cc16; }
.score-average .score-number { color: var(--warn); }
.score-poor .score-number { color: var(--fail); }

/* ── Progress ──────────────────────────────────────────────────────────── */

.progress-container {
    margin-bottom: 28px;
    animation: slideInDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--red) 0%, #ff6b6b 50%, #ff4d4d 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 10px rgba(220, 39, 39, 0.6), inset 0 1px 2px rgba(255,255,255,0.1);
}

.progress-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Category Cards ────────────────────────────────────────────────────── */

.categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    transition: border-color 0.3s ease;
}

.category-card:hover { border-color: var(--border-light); }

.category-card:nth-child(1) { animation-delay: 0s; }
.category-card:nth-child(2) { animation-delay: 0.08s; }
.category-card:nth-child(3) { animation-delay: 0.16s; }
.category-card:nth-child(4) { animation-delay: 0.24s; }
.category-card:nth-child(5) { animation-delay: 0.32s; }
.category-card:nth-child(6) { animation-delay: 0.4s; }

.cat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.cat-header:hover { 
    background: var(--bg-card-hover);
}

.cat-icon { font-size: 20px; width: 22px; height: 22px; flex-shrink: 0; color: var(--red); }
.cat-icon svg { width: 100%; height: 100%; }

.cat-header h3 {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
}

.cat-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--border);
    color: var(--text-dim);
}

.cat-badge.all-pass { background: var(--pass-bg); color: var(--pass); }
.cat-badge.has-warn { background: var(--warn-bg); color: var(--warn); }
.cat-badge.has-fail { background: var(--fail-bg); color: var(--fail); }

.cat-chevron {
    color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.category-card.open .cat-chevron { transform: rotate(180deg); }

.cat-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card.open .cat-items { max-height: 3000px; }

/* ── Check Items ───────────────────────────────────────────────────────── */

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    animation: slideInLeft 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.check-status {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 1px;
}

.check-status.pass { background: var(--pass-bg); color: var(--pass); }
.check-status.warn { background: var(--warn-bg); color: var(--warn); }
.check-status.fail { background: var(--fail-bg); color: var(--fail); }
.check-status.info { background: var(--info-bg); color: var(--info); }

.check-content { flex: 1; min-width: 0; }

.check-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.check-title .status-text {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-text.pass { background: var(--pass-bg); color: var(--pass); }
.status-text.warn { background: var(--warn-bg); color: var(--warn); }
.status-text.fail { background: var(--fail-bg); color: var(--fail); }
.status-text.info { background: var(--info-bg); color: var(--info); }

.check-details {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
}

.check-details code {
    background: rgba(255,255,255,0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text);
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
    word-break: break-all;
}

.check-details .detail-row {
    display: flex;
    gap: 8px;
    padding: 2px 0;
}

.check-details .detail-label {
    color: var(--text-muted);
    min-width: 100px;
    flex-shrink: 0;
}

.check-details .detail-value {
    color: var(--text-dim);
    word-break: break-word;
}

.detail-tag {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px 3px 2px 0;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-dim);
}

.detail-tag.found { border-color: var(--pass); color: var(--pass); background: var(--pass-bg); }
.detail-tag.missing { border-color: var(--fail); color: var(--fail); background: var(--fail-bg); }
.detail-tag.tech { border-color: var(--info); color: var(--info); background: var(--info-bg); }

.check-recommendation {
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(220, 39, 39, 0.05);
    border-left: 3px solid var(--red);
    border-radius: 0 6px 6px 0;
    font-size: 12.5px;
    color: var(--text-dim);
    line-height: 1.7;
}

.check-recommendation .rec-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.check-recommendation .rec-title svg {
    width: 14px;
    height: 14px;
    color: var(--red);
    flex-shrink: 0;
}

.check-recommendation code {
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11.5px;
    color: var(--text);
    font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

/* ── Info Section ───────────────────────────────────────────────────────── */

.info-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 24px 60px;
}

.info-main-title {
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #fff 0%, #ccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-main-desc {
    text-align: center;
    color: var(--text-dim);
    font-size: 15px;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: border-color var(--transition), transform var(--transition);
}

.info-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.info-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    color: var(--red);
}

.info-icon svg { width: 100%; height: 100%; }

.ft-icon {
    width: 16px;
    height: 16px;
    vertical-align: -2px;
    flex-shrink: 0;
}

.info-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.info-card p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.7;
}

.info-how {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
}

.info-how h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 28px;
}

.info-steps {
    display: flex;
    gap: 32px;
    justify-content: center;
}

.info-step {
    flex: 1;
    max-width: 240px;
    text-align: center;
}

.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.info-step p {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .info-grid { grid-template-columns: 1fr; }
    .info-steps { flex-direction: column; align-items: center; gap: 20px; }
    .info-main-title { font-size: 22px; }
    .info-section { padding: 20px 16px 40px; }
}

@media (max-width: 480px) {
    .info-grid { gap: 10px; }
    .info-card { padding: 18px; }
    .info-how { padding: 20px; }
}

/* ── Footer ────────────────────────────────────────────────────────────── */

footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 24px;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Animations ────────────────────────────────────────────────────────── */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading-pulse { animation: pulse 1.5s ease-in-out infinite; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .hero { padding: 50px 16px 30px; }
    .hero h1 { font-size: 28px; }
    .hero-desc { font-size: 14px; margin-bottom: 24px; }

    .search-box { flex-direction: column; }
    #checkBtn { border-radius: 10px; padding: 14px; }

    .results-area { padding: 0 16px 60px; }

    .score-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px;
    }

    .check-item { padding: 14px 16px; }
    .check-details .detail-row { flex-direction: column; gap: 2px; }
    .check-details .detail-label { min-width: auto; }

    .hero-features { gap: 6px; }
    .feature-tag { font-size: 11px; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 24px; }
    .nav-content { padding: 0 16px; }
    .logo-text { display: none; }
    .logo-divider { display: none; }
}
