/* ===========================
   Base
   =========================== */
body {
    background-color: #f0f4f8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

header {
    background: #fff;
    border-bottom: 1px solid #e8edf2;
}

/* ===========================
   Map
   =========================== */
#map {
    position: relative;
    width: 100%;
    height: 580px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
}

/* ===========================
   Cards
   =========================== */
.card {
    border: none;
    border-radius: 14px;
}

/* ===========================
   Point badges (A/B)
   =========================== */
.point-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin-right: 4px;
    vertical-align: middle;
}

.point-a {
    background: #22c55e;
}

.point-b {
    background: #3b82f6;
}

/* ===========================
   Suggest dropdown
   =========================== */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    overflow: hidden;
    max-height: 220px;
    overflow-y: auto;
}

.suggestions-dropdown:empty {
    display: none;
}

.suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.3;
    border-bottom: 1px solid #f5f5f5;
    color: #333;
    transition: background 0.12s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f0f4ff;
    color: #1d4ed8;
}

.suggestion-item .suggest-sub {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

/* ===========================
   Score circle
   =========================== */
.score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transition: background 0.4s;
}

.score-circle.score-excellent {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 16px rgba(17, 153, 142, 0.4);
}

.score-circle.score-good {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    box-shadow: 0 4px 16px rgba(247, 151, 30, 0.4);
}

.score-circle.score-ok {
    background: linear-gradient(135deg, #f953c6 0%, #b91d73 100%);
    box-shadow: 0 4px 16px rgba(249, 83, 198, 0.35);
}

.score-circle.score-bad {
    background: linear-gradient(135deg, #cb2d3e 0%, #ef473a 100%);
    box-shadow: 0 4px 16px rgba(203, 45, 62, 0.4);
}

/* ===========================
   Stats row
   =========================== */
.stats-row {
    background: #f8faff;
    border-radius: 10px;
    padding: 10px 0;
}

/* ===========================
   Score breakdown
   =========================== */
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.875rem;
    border-bottom: 1px solid #f0f0f0;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.breakdown-plus {
    font-weight: 600;
    color: #16a34a;
}

.breakdown-minus {
    font-weight: 600;
    color: #dc2626;
}

.breakdown-total {
    font-weight: 700;
    font-size: 1rem;
    color: #1d4ed8;
}

/* ===========================
   AI result box
   =========================== */
.ai-result-box {
    background: #f8faff;
    border: 1px solid #c7d7fb;
    border-radius: 10px;
    padding: 14px;
}

.ai-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ===========================
   Map placeholders
   =========================== */
.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
    border-radius: 14px;
    text-align: center;
    padding: 24px;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 991.98px) {
    #map {
        height: 380px;
    }
}

/* ===========================
   POI list
   =========================== */
.poi-item {
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    margin-bottom: 6px;
    transition: background 0.15s, border-color 0.15s;
}

.poi-item:hover {
    background: #f0f4ff;
    border-color: #93c5fd;
}

.poi-item-active {
    background: #eff6ff;
    border-color: #3b82f6;
}

.poi-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.poi-item-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.poi-item-rubric {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Formula breakdown */
.formula-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    text-align: center;
}
.formula-box code {
    color: #475569;
}
