:root {
    --bg-dark: #09090b;
    --bg-card: #13131f;
    --primary-neon: #00f3ff;
    --secondary-neon: #bc13fe;
    --success-neon: #0aff64;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(188, 19, 254, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(0, 243, 255, 0.1) 0%, transparent 20%);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Header --- */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, var(--primary-neon), var(--secondary-neon));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(188, 19, 254, 0.5));
}

/* --- Model Buttons (Tabs) --- */
.model-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.model-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.model-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-neon);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.model-btn.active {
    background: linear-gradient(135deg, rgba(0, 243, 255, 0.2), rgba(188, 19, 254, 0.2));
    border-color: var(--primary-neon);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.4);
    text-shadow: 0 0 5px var(--primary-neon);
}

/* --- Content Visibility --- */
.model-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.model-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Robot Header Section --- */
.robot-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.robot-image {
    width: 400px;
    height: 300px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.2);
    border: 1px solid var(--glass-border);
}

.robot-info h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: var(--primary-neon);
}

.robot-description {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* --- General Section Styling --- */
.section {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

/* Little glowing accent line */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-neon), var(--secondary-neon));
}

.section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Calculator --- */
.calculation {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.calc-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    color: var(--primary-neon);
    padding: 12px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: var(--font-family);
    outline: none;
    transition: 0.3s;
}

.calc-input:focus {
    border-color: var(--primary-neon);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.expenses-info {
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
    padding-top: 15px;
}

/* Payback Scale */
.payback-scale-container {
    margin-top: 10px;
}

.payback-scale {
    height: 24px;
    background: #2a2a35;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.payback-fill {
    height: 100%;
    width: 0%; /* JS will change this */
    background: linear-gradient(90deg, var(--primary-neon), var(--success-neon));
    box-shadow: 0 0 15px var(--success-neon);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.payback-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    z-index: 2;
}

.payback-result {
    text-align: right;
    font-size: 1.2rem;
}

.payback-value {
    color: var(--success-neon);
    font-weight: bold;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(10, 255, 100, 0.4);
}

/* --- Features List --- */
.features-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.features-list li {
    padding-left: 25px;
    position: relative;
    color: var(--text-muted);
}

.features-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--primary-neon);
    text-shadow: 0 0 5px var(--primary-neon);
}

/* --- Characteristics & Tables --- */
.characteristics-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
}

.characteristics-left,
.characteristics-right {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(0, 243, 255, 0.1);
    border: 1px solid var(--primary-neon);
    border-radius: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--primary-neon);
    font-size: 1rem;
    flex-wrap: wrap;
}

.column-header span {
    color: var(--text-muted);
    font-weight: 400;
}

.model-select {
    background: #000;
    color: #fff;
    border: 1px solid var(--primary-neon);
    padding: 8px 12px;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    font-size: 0.9rem;
    flex: 1;
    min-width: 120px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.specs-table td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.specs-table tr:last-child td {
    border-bottom: none;
}

.specs-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Левая таблица - с названиями характеристик */
.characteristics-left .specs-table td:first-child {
    color: var(--primary-neon);
    font-weight: 600;
    width: 40%;
}

.characteristics-left .specs-table td:last-child {
    color: var(--text-muted);
}

/* Правая таблица - только значения */
.characteristics-right .specs-table td {
    color: var(--text-muted);
    width: 100%;
}

/* Синхронизация высоты строк */
.specs-table tr {
    height: auto;
    min-height: 44px;
}

.specs-table td {
    vertical-align: middle;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .characteristics-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .specs-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .specs-table td:first-child {
        width: 45%;
    }
    
    .column-header {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .robot-header {
        flex-direction: column;
        text-align: center;
    }
    
    .robot-image {
        width: 100%;
        max-width: 300px;
        height: auto;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .model-buttons {
        gap: 8px;
    }
    
    .model-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .characteristics-container {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        align-items: start;
    }
    
    .characteristics-left,
    .characteristics-right {
        display: flex;
        flex-direction: column;
    }
    
    .column-header {
        padding: 8px 10px;
        font-size: 0.7rem;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 6px;
        min-height: 70px;
    }
    
    .model-select {
        width: 100%;
        padding: 5px 6px;
        font-size: 0.7rem;
    }
    
    .specs-table {
        font-size: 0.65rem;
    }
    
    .specs-table td {
        padding: 6px 4px;
        word-break: break-word;
        line-height: 1.3;
    }
    
    .specs-table td:first-child {
        width: 45%;
    }
    
    .section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .section h3 {
        font-size: 1.2rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .calc-inputs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .model-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .robot-info h2 {
        font-size: 1.5rem;
    }
    
    .robot-description {
        font-size: 0.95rem;
    }
    
    .specs-table {
        font-size: 0.55rem;
    }
    
    .specs-table td {
        padding: 4px 3px;
        line-height: 1.2;
    }
    
    .column-header {
        font-size: 0.6rem;
        padding: 6px;
        min-height: 60px;
        gap: 4px;
    }
    
    .model-select {
        padding: 4px 5px;
        font-size: 0.6rem;
    }
}