:root {
    --primary: #00ff88;
    --bg: #121212;
    --card-bg: #1e1e1e;
    --text: #e0e0e0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0; padding: 20px; transition: 0.3s;
}

body.light-theme {
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --primary: #0066ff;
}

.container { max-width: 900px; margin: 0 auto; }

.top-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 0.9em; }

header { text-align: center; margin-bottom: 25px; }
h1 { color: var(--primary); font-size: 2.2rem; margin: 0; }

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px; margin-bottom: 30px;
}

.stat-card {
    background: var(--card-bg); padding: 15px; border-radius: 12px;
    text-align: center; border-left: 4px solid var(--primary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.stat-card .label { font-size: 0.75rem; color: #888; text-transform: uppercase; }
.stat-card .value { font-size: 1.1rem; font-weight: bold; margin-top: 5px; color: var(--primary); }

/* Формы */
input {
    background: var(--card-bg); border: 1px solid #444; color: var(--text);
    padding: 12px; border-radius: 8px; margin: 5px; outline: none; flex: 1;
}

.add-form {
    display: flex; flex-wrap: wrap; gap: 10px; background: var(--card-bg);
    padding: 20px; border-radius: 12px; margin-bottom: 20px;
}

.btn-add { background: var(--primary); color: #000; border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-weight: bold; }

.controls { display: flex; flex-direction: column; gap: 15px; margin-bottom: 30px; }

.sort-buttons button {
    background: transparent; border: 1px solid var(--primary); color: var(--primary);
    padding: 8px 15px; border-radius: 6px; cursor: pointer; transition: 0.2s; margin-right: 5px;
}

.sort-buttons button:hover { background: var(--primary); color: #000; }

/* Сетка */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.car-card {
    background: var(--card-bg); padding: 20px; border-radius: 12px;
    border: 1px solid #333; position: relative; transition: 0.3s;
}

.car-card:hover { transform: translateY(-5px); border-color: var(--primary); }

.rating-high { color: #00ff88; font-weight: bold; }
.rating-mid { color: #ffcc00; }
.rating-low { color: #ff4444; }

.btn-delete {
    margin-top: 15px; background: none; color: #ff4444;
    border: 1px solid #ff4444; padding: 6px; border-radius: 4px; cursor: pointer; width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center; padding: 50px; background: var(--card-bg);
    border-radius: 15px; border: 2px dashed #444;
}

.empty-icon { font-size: 3rem; margin-bottom: 10px; }

.btn-restore { background: var(--primary); color: #000; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: bold; margin-top: 15px; }

.btn-clear { background: none; border: 1px solid #ff4444; color: #ff4444; cursor: pointer; padding: 5px 10px; border-radius: 5px; }