body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #e3f2fd;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.main-wrapper {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(25, 118, 210, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tabs {
    display: flex;
    background-color: #f5f9fc;
}

.tab-btn {
    flex: 1;
    padding: 18px;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 700;
    color: #90a4ae;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #1976d2;
    background: #fff;
    border-bottom: 3px solid #1976d2;
}

.tab-content {
    display: none;
    padding: 25px;
    flex-direction: column;
    align-items: center;
}

.tab-content.active {
    display: flex;
    animation: fadeEffect 0.4s;
}

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

.card {
    background: linear-gradient(145deg, #ffffff, #f0f7ff);
    border: 2px solid #e1f5fe;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 25px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.03);
}

.text-en {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0d47a1;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.text-ru {
    font-size: 1.1rem;
    color: #546e7a;
    margin: 0;
}

.controls-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

/* Главная кнопка Next */
.btn-next {
    width: 100%;
    padding: 18px;
    background: linear-gradient(90deg, #1e88e5, #42a5f5);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 15px rgba(33, 150, 243, 0.3);
    transition: transform 0.1s;
}

.btn-next:active {
    transform: scale(0.98);
}

/* Ряд настроек */
.settings-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.btn-settings {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    background: #e3f2fd;
    color: #1565c0;
    transition: background 0.2s;
}

.btn-settings:hover {
    background: #bbdefb;
}

/* Стили для режима Рандом */
.btn-settings.random-active {
    background: #81d4fa;
    color: #01579b;
}

/* Стили для Авто-режима (Активен) */
.btn-auto.auto-active {
    background: #ffcdd2; /* Светло-красный */
    color: #c62828;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 83, 80, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 83, 80, 0); }
}

.list-container {
    width: 100%;
    border-top: 1px solid #eceff1;
    max-height: 200px;
    overflow-y: auto;
}

.pattern-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pattern-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 0.9rem;
    color: #455a64;
    cursor: pointer;
    border-radius: 8px;
    margin: 5px 0;
}

.pattern-list li:hover {
    background-color: #f1f8e9;
    color: #2e7d32;
}

.pattern-list span.en {
    display: block;
    font-weight: 600;
    margin-bottom: 3px;
}