:root {
    --primary-red: #ff3333;
    --primary-blue: #3399ff;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --text-muted: rgba(255, 255, 255, 0.5);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 240px 1fr;
    gap: 25px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

#import-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    padding: 1rem;
}

#import-modal .modal-content {
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 20px;
}

#import-modal .modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

#import-modal .modal-actions button {
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

#import-modal #confirm-import {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

#paste-input {
    width: 100%;
    min-height: 160px;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.level-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0;
}

.level-row span {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
}

.compare-ev-grid {
    grid-template-columns: 1fr 200px 1fr;
}

@media (max-width: 1100px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .compare-ev-grid {
        grid-template-columns: 1fr;
    }
}

.calc-panel {
    padding: 30px;
    border-radius: 24px;
    transition: transform 0.3s ease;
}

.attacker-panel { border-top: 3px solid var(--primary-red); }
.defender-panel { border-top: 3px solid var(--primary-blue); }

.search-input {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: rgba(255, 255, 255, 0.06);
}

.search-results {
    position: absolute;
    width: calc(100% - 60px);
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

/* Compare Table Improvements */
.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.compare-table td {
    padding: 15px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-table td:first-child { border-radius: 12px 0 0 12px; border-left: 1px solid rgba(255, 255, 255, 0.05); }
.compare-table td:last-child { border-radius: 0 12px 12px 0; border-right: 1px solid rgba(255, 255, 255, 0.05); }

.stat-name {
    font-size: 0.75rem;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-win {
    color: #4CAF50;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.stat-lose {
    color: rgba(255, 51, 51, 0.6);
    font-weight: 700;
}

/* Stats Editor Table */
.stats-table {
    width: 100%;
    margin: 20px 0;
}

.stats-table th {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    padding-bottom: 10px;
}

.stats-table input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    padding: 6px;
    text-align: center;
    font-weight: 700;
}

/* Meta Inputs */
.meta-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}

.select-group label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

select, input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    padding: 10px;
    font-weight: 700;
}

.import-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    border-radius: 12px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
}

.import-btn:hover {
    background: var(--primary-red);
    color: white;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.3);
}

/* Banner */
#compare-banner {
    padding: 3rem 1rem;
    text-align: center;
}

#compare-banner h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -1.5px;
    background: linear-gradient(to bottom, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
