/* ── Eres SEO Tool Styles ── */
#eres-seo-tool {
    --est-primary: #3b82f6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Hero ── */
.est-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f4c8a 100%);
    border-radius: 20px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.est-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(99,179,237,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.est-hero-inner { position: relative; z-index: 1; }

.est-badge {
    display: inline-block;
    background: rgba(99,179,237,0.15);
    border: 1px solid rgba(99,179,237,0.3);
    color: #93c5fd;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
}
.est-hero-title {
    font-size: clamp(24px, 4vw, 42px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 14px;
    line-height: 1.2;
}
.est-hero-desc {
    color: #94a3b8;
    font-size: 16px;
    margin: 0 0 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Form ── */
.est-form-wrap { max-width: 700px; margin: 0 auto; }
.est-input-group {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s;
}
.est-input-group:focus-within { border-color: var(--est-primary); }
.est-input-icon {
    color: #64748b;
    padding: 0 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.est-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 15px;
    padding: 16px 4px;
    min-width: 0;
}
.est-input-group input::placeholder { color: #475569; }
.est-input-group button {
    background: linear-gradient(135deg, var(--est-primary), #1d4ed8);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 16px 28px;
    cursor: pointer;
    transition: opacity .2s;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.est-input-group button:hover { opacity: .9; }
.est-hint { color: #475569; font-size: 13px; margin-top: 10px; }

@keyframes est-spin { to { transform: rotate(360deg); } }
.est-spin { animation: est-spin .7s linear infinite; }

/* ── Loading ── */
#est-loading { text-align: center; padding: 60px 20px; }
.est-loading-box { display: inline-block; }
.est-loading-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 40px;
    margin-bottom: 20px;
}
.est-loading-bars span {
    display: block;
    width: 6px;
    background: var(--est-primary);
    border-radius: 3px;
    animation: est-bar .8s ease-in-out infinite;
}
.est-loading-bars span:nth-child(1){ height: 16px; animation-delay: 0s; }
.est-loading-bars span:nth-child(2){ height: 28px; animation-delay: .1s; }
.est-loading-bars span:nth-child(3){ height: 40px; animation-delay: .2s; }
.est-loading-bars span:nth-child(4){ height: 28px; animation-delay: .3s; }
.est-loading-bars span:nth-child(5){ height: 16px; animation-delay: .4s; }
@keyframes est-bar {
    0%, 100% { opacity: .3; }
    50%       { opacity: 1; transform: scaleY(1.2); }
}
.est-loading-step { color: #475569; font-size: 15px; }
.est-loading-url  { color: var(--est-primary); font-size: 13px; margin-top: 6px; word-break: break-all; }

/* ── Error ── */
.est-error-box {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    color: #9f1239;
}
.est-error-icon { font-size: 22px; flex-shrink: 0; }

/* ── Results ── */
.est-results-inner { padding: 40px 0 20px; }

/* ── Score Cards ── */
.est-score-cards {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
    margin-bottom: 36px;
    align-items: start;
}
@media (max-width: 700px) {
    .est-score-cards { grid-template-columns: 1fr; }
}

.est-score-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: box-shadow .2s;
}
.est-score-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }

.est-card-main {
    padding: 28px 20px 20px;
    text-align: center;
}
.est-score-ring-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 12px;
}
.est-score-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.est-ring-bg    { fill: none; stroke: #f1f5f9; stroke-width: 10; }
.est-ring-fill  {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 327;
    stroke-dashoffset: 327;
    transition: stroke-dashoffset 1.2s ease, stroke .4s;
}
.est-score-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 1px;
}
.est-score-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
}
.est-score-max { font-size: 13px; color: #94a3b8; align-self: flex-end; padding-bottom: 4px; }
.est-card-label { font-weight: 700; font-size: 15px; color: #334155; margin-bottom: 6px; }
.est-grade {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    letter-spacing: .5px;
}

.est-score-mini-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (max-width: 500px) {
    .est-score-mini-cards { grid-template-columns: 1fr; }
}

.est-card-mini { padding: 18px 20px; }
.est-mini-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.est-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.est-icon-seo    { background: #eff6ff; color: var(--est-primary); }
.est-icon-ai     { background: #f0fdf4; color: #22c55e; }
.est-icon-tech   { background: #faf5ff; color: #a855f7; }
.est-icon-social { background: #fff7ed; color: #f97316; }

.est-mini-num { font-size: 30px; font-weight: 800; color: #0f172a; }
.est-mini-bar-wrap { background: #f1f5f9; border-radius: 99px; height: 6px; margin-bottom: 8px; overflow: hidden; }
.est-mini-bar {
    height: 100%;
    border-radius: 99px;
    width: 0%;
    transition: width 1s ease;
}
.est-mini-label { font-size: 13px; font-weight: 600; color: #64748b; }

/* Score colors */
.score-great  .est-ring-fill,
.score-great  .est-mini-bar  { stroke: #22c55e; background: #22c55e; }
.score-good   .est-ring-fill,
.score-good   .est-mini-bar  { stroke: #84cc16; background: #84cc16; }
.score-ok     .est-ring-fill,
.score-ok     .est-mini-bar  { stroke: #f59e0b; background: #f59e0b; }
.score-poor   .est-ring-fill,
.score-poor   .est-mini-bar  { stroke: #ef4444; background: #ef4444; }

.grade-great { background: #dcfce7; color: #166534; }
.grade-good  { background: #d9f99d; color: #3f6212; }
.grade-ok    { background: #fef9c3; color: #854d0e; }
.grade-poor  { background: #fee2e2; color: #991b1b; }

/* ── Tabs ── */
.est-tabs {
    display: flex;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.est-tab {
    flex: 1;
    min-width: 120px;
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    border-radius: 9px;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.est-tab:hover  { color: #1e293b; background: #fff; }
.est-tab.active { background: #fff; color: #1e293b; box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.est-tab-content { display: none; }
.est-tab-content.active { display: block; }

/* ── AI Info Banner ── */
.est-ai-info {
    display: flex;
    gap: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.5;
}
.est-ai-info-icon { flex-shrink: 0; margin-top: 1px; }

/* ── Checks Grid ── */
.est-checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.est-check-item {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 16px 18px;
    display: flex;
    gap: 13px;
    align-items: flex-start;
    transition: box-shadow .15s;
}
.est-check-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,.07); }

.est-check-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
    margin-top: 1px;
}
.check-pass .est-check-icon { background: #dcfce7; color: #16a34a; }
.check-warn .est-check-icon { background: #fef9c3; color: #ca8a04; }
.check-fail .est-check-icon { background: #fee2e2; color: #dc2626; }
.check-info .est-check-icon { background: #dbeafe; color: #2563eb; }

.check-pass { border-left: 3px solid #22c55e; }
.check-warn { border-left: 3px solid #f59e0b; }
.check-fail { border-left: 3px solid #ef4444; }
.check-info { border-left: 3px solid var(--est-primary); }

.est-check-body { flex: 1; min-width: 0; }
.est-check-label {
    font-weight: 700;
    font-size: 13.5px;
    color: #1e293b;
    margin-bottom: 4px;
}
.est-check-msg {
    font-size: 13px;
    color: #64748b;
    line-height: 1.45;
}
.est-check-value {
    margin-top: 6px;
    font-size: 12px;
    color: var(--est-primary);
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 4px 8px;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* ── Site Info Box ── */
.est-site-info-box {
    margin-top: 28px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 22px 24px;
}
.est-site-info-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 16px;
}
.est-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.est-info-item { }
.est-info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; margin-bottom: 4px; }
.est-info-val   { font-size: 15px; font-weight: 700; color: #1e293b; }

/* ── Reanalyze ── */
.est-reanalyze { text-align: center; margin-top: 32px; }
.est-reanalyze-btn {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s;
}
.est-reanalyze-btn:hover { background: #e2e8f0; color: #1e293b; }
