/* ============================================================
   MATCHSPECS — Compare Page Styles
   ============================================================ */

/* ─── Compare Page Layout ───────────────────────── */
.compare-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #FAF3E1 0%, #F5E7C6 50%, #FAF3E1 100%);
    padding: 100px 20px 40px;
}

.compare-container {
    max-width: 900px;
    margin: 0 auto;
}

/* ─── Back Link ──────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #777;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: all 0.2s;
    padding: 6px 12px;
    border-radius: 50px;
}

.back-link:hover {
    color: #222;
    background: rgba(0,0,0,0.03);
}

/* ─── Compare Header ─────────────────────────────── */
.compare-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.compare-entity {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    min-width: 200px;
    flex: 1;
    max-width: 340px;
}

.entity-img-wrap {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    background: #F5F0E8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.entity-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.entity-info {
    flex: 1;
    min-width: 0;
}

.entity-name {
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.variant-select {
    width: 100%;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #E0D8CC;
    background: #FAF7F2;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.variant-select:focus {
    border-color: #CBDCEB;
    box-shadow: 0 0 0 3px rgba(203,220,235,0.3);
}

.vs-badge {
    flex-shrink: 0;
}

.vs-badge span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    font-weight: 800;
    font-size: 0.85rem;
    color: #222;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 2px solid #F1F0E4;
}

/* ─── Specs Card (Highlighted) ───────────────────── */
.specs-card {
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    border: 2px solid #E0D5C5;
    margin-bottom: 24px;
}

.specs-card-header {
    background: linear-gradient(135deg, #D9CFC7, #C9B59C);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.specs-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #222;
}

.specs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.specs-table thead th {
    background: #FAF7F2;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #555;
    border-bottom: 2px solid #E0D8CC;
    text-align: left;
}

.specs-table thead th:first-child {
    border-radius: 0;
}

.specs-table tbody td {
    padding: 12px 16px;
    font-size: 0.88rem;
    color: #333;
    border-bottom: 1px solid #F0EBE0;
}

.specs-table tbody tr:last-child td {
    border-bottom: none;
}

.specs-table tbody tr:hover td {
    background: #FDFAF5;
}

.spec-label {
    font-weight: 600;
    color: #444 !important;
}

td.winner {
    color: #16a34a !important;
    font-weight: 700;
    position: relative;
}

td.winner::after {
    content: '';
}

/* ─── Content Cards ──────────────────────────────── */
.content-card {
    background: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}

.content-card-header {
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #F0EBE0;
    background: #FAF7F2;
}

.content-card-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
}

.content-card-body {
    padding: 20px 22px;
}

/* ─── Bullets List ───────────────────────────────── */
.bullets-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bullets-list li {
    position: relative;
    padding-left: 24px;
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
}

.bullets-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C9B59C;
}

/* ─── Analysis Text ──────────────────────────────── */
.analysis-text {
    font-size: 0.92rem;
    color: #333;
    line-height: 1.85;
}

/* ─── Verdict Card ───────────────────────────────── */
.verdict-card {
    border: 1.5px solid #E0D5C5;
    background: linear-gradient(135deg, #FFFDF9, #FFFBF5);
}

.verdict-card .content-card-header {
    background: linear-gradient(135deg, #FDF8F0, #FBF3E8);
}

.verdict-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #222;
    line-height: 1.8;
}

/* ─── Ad Placeholder ─────────────────────────────── */
.ad-placeholder {
    text-align: center;
    padding: 24px;
    margin: 24px 0;
    background: rgba(255,255,255,0.5);
    border-radius: 14px;
    border: 1px dashed #DDD;
    color: #999;
    font-size: 0.78rem;
}

/* ─── Chat Icon & Panel ──────────────────────────── */
.chat-icon {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D9CFC7, #C9B59C);
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #222;
}

.chat-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(0,0,0,0.16);
}

.chat-panel {
    position: fixed;
    bottom: 90px;
    right: 28px;
    width: 340px;
    max-height: 440px;
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    z-index: 1001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: chatSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-panel.d-none {
    display: none;
}

@keyframes chatSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #D9CFC7, #C9B59C);
    font-size: 0.9rem;
    color: #222;
}

.chat-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #555;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.chat-close:hover { color: #222; }

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    max-height: 280px;
    background: #FAF7F2;
}

.chat-placeholder {
    text-align: center;
    color: #AAA;
    font-size: 0.82rem;
    margin: auto;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.82rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-user {
    align-self: flex-end;
    background: #D9CFC7;
    color: #222;
    border-bottom-right-radius: 4px;
}

.chat-msg-bot {
    align-self: flex-start;
    background: #FFFFFF;
    color: #333;
    border: 1px solid #E8E0D5;
    border-bottom-left-radius: 4px;
}

.chat-msg.typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.chat-msg.typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #BBB;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #EEE;
    background: #FFF;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 50px;
    border: 1.5px solid #E0D8CC;
    background: #FAF7F2;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s;
}

.chat-input:focus {
    border-color: #CBDCEB;
    box-shadow: 0 0 0 3px rgba(203,220,235,0.2);
}

.chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #D9CFC7;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send:hover {
    background: #C9B59C;
    transform: scale(1.05);
}

/* ─── Compare Footer ─────────────────────────────── */
.compare-footer {
    position: relative;
    padding: 40px 20px 24px;
    background: transparent;
    text-align: center;
    overflow: hidden;
    margin-top: 20px;
}

.compare-footer .footer-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 10vw, 12rem);
    font-weight: 900;
    color: #222;
    opacity: 0.018;
    white-space: nowrap;
    pointer-events: none;
    width: 100%;
    z-index: 0;
}

.compare-footer-inner {
    position: relative;
    z-index: 1;
}

.footer-logo-link {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: #222;
    text-decoration: none;
    letter-spacing: 2px;
}

.footer-tagline {
    font-size: 0.78rem;
    color: #888;
    margin: 4px 0 12px;
}

.footer-links-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.footer-links-row a {
    text-decoration: none;
    color: #555;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links-row a:hover { color: #222; }

.footer-dot {
    color: #CCC;
    font-size: 0.7rem;
}

.footer-copy-text {
    font-size: 0.72rem;
    color: #AAA;
    margin: 0;
}

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
    .compare-page {
        padding: 90px 12px 30px;
    }
    
    .compare-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .compare-entity {
        max-width: 100%;
        width: 100%;
        padding: 12px 16px;
    }
    
    .entity-img-wrap {
        width: 50px;
        height: 50px;
        border-radius: 10px;
    }
    
    .entity-name {
        font-size: 0.9rem;
    }
    
    .vs-badge span {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }
    
    .specs-card-header {
        padding: 12px 16px;
    }
    
    .specs-card-header h3 {
        font-size: 0.9rem;
    }
    
    .specs-table thead th,
    .specs-table tbody td {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
    
    .content-card-header {
        padding: 12px 16px;
    }
    
    .content-card-header h3 {
        font-size: 0.85rem;
    }
    
    .content-card-body {
        padding: 14px 16px;
    }
    
    .bullets-list li {
        font-size: 0.82rem;
    }
    
    .analysis-text {
        font-size: 0.85rem;
    }
    
    .verdict-text {
        font-size: 0.88rem;
    }
    
    .chat-panel {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
        bottom: 80px;
    }
    
    .chat-icon {
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .compare-page {
        padding: 80px 8px 20px;
    }
    
    .compare-entity {
        padding: 10px 12px;
        border-radius: 14px;
    }
    
    .entity-img-wrap {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }
    
    .entity-name {
        font-size: 0.8rem;
    }
    
    .variant-select {
        font-size: 0.7rem;
    }
    
    .specs-table {
        min-width: 400px;
    }
    
    .specs-table thead th,
    .specs-table tbody td {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
}