.settings-main {
    position: relative;
    z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 16px 100px;
}

.settings-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 16px;
}

.settings-card h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card h2 i {
    color: #6C5CE7;
}

.settings-card p.settings-desc {
    font-size: 12px;
    color: #8888aa;
    margin-bottom: 16px;
    line-height: 1.5;
}

.theme-toggle-row {
    display: flex;
    gap: 10px;
}

.theme-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    color: #aab;
    font-size: 12px;
    font-weight: 600;
}

.theme-option i {
    font-size: 22px;
}

.theme-option.active {
    border-color: #6C5CE7;
    background: rgba(108, 92, 231, 0.12);
    color: #eef;
}

.theme-option:hover:not(.active) {
    border-color: rgba(108, 92, 231, 0.3);
}

.lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
    color: #ccd;
}

.lang-option .lang-flag {
    font-size: 20px;
}

.lang-option.active {
    border-color: #00B4D8;
    background: rgba(0, 180, 216, 0.1);
    color: #fff;
}

.settings-save-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6C5CE7, #00B4D8);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.settings-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.35);
}

.settings-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.settings-info-row:last-child {
    border-bottom: none;
}

.settings-info-row span {
    color: #8888aa;
}

.settings-info-row strong {
    color: #dde;
}

/* ============ SOUND SYSTEM ============ */
.sound-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.sound-card-top h2 {
    margin-bottom: 6px;
}

.sound-card-top .settings-desc {
    margin-bottom: 0;
}

.sound-status-badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(136, 136, 170, 0.15);
    color: #8888aa;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.25s;
}

.sound-status-badge.on {
    background: rgba(68, 221, 170, 0.12);
    color: #44ddaa;
    border-color: rgba(68, 221, 170, 0.25);
    box-shadow: 0 0 16px rgba(68, 221, 170, 0.15);
}

.sound-control-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sound-visual {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 32px;
    flex: 1;
}

.sound-bar {
    width: 5px;
    height: 8px;
    border-radius: 3px;
    background: rgba(136, 136, 170, 0.35);
    transition: background 0.2s;
}

html[data-sound="on"] .sound-bar {
    background: linear-gradient(180deg, #6C5CE7, #00B4D8);
    animation: soundWave 0.9s ease-in-out infinite;
}

html[data-sound="on"] .sound-bar:nth-child(1) { animation-delay: 0s; }
html[data-sound="on"] .sound-bar:nth-child(2) { animation-delay: 0.12s; }
html[data-sound="on"] .sound-bar:nth-child(3) { animation-delay: 0.24s; }
html[data-sound="on"] .sound-bar:nth-child(4) { animation-delay: 0.12s; }
html[data-sound="on"] .sound-bar:nth-child(5) { animation-delay: 0s; }

@keyframes soundWave {
    0%, 100% { height: 8px; opacity: 0.5; }
    50% { height: 28px; opacity: 1; }
}

.sound-toggle-wrap {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    flex-shrink: 0;
}

.sound-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sound-toggle-track {
    display: block;
    width: 58px;
    height: 32px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transition: background 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.sound-toggle-input:checked + .sound-toggle-track {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.5), rgba(0, 180, 216, 0.4));
    border-color: rgba(108, 92, 231, 0.5);
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.25);
}

.sound-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #888;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.sound-toggle-input:checked + .sound-toggle-track .sound-toggle-thumb {
    transform: translateX(26px);
    color: #6C5CE7;
}

.sound-icon-on { display: none; }
.sound-icon-off { display: block; }
.sound-toggle-input:checked + .sound-toggle-track .sound-icon-on { display: block; }
.sound-toggle-input:checked + .sound-toggle-track .sound-icon-off { display: none; }

.sound-preview-btn {
    width: 100%;
    margin-top: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(108, 92, 231, 0.35);
    background: rgba(108, 92, 231, 0.08);
    color: #b8b0ff;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

.sound-preview-btn:hover {
    background: rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.5);
    color: #ddd6ff;
}

.sound-preview-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

html[data-theme="light"] .sound-control-row {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.06);
}

html[data-theme="light"] .sound-toggle-track {
    background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
    .sound-card-top {
        flex-direction: column;
        align-items: flex-start;
    }
    .sound-control-row {
        flex-direction: column;
        align-items: stretch;
    }
    .sound-visual {
        justify-content: center;
    }
    .sound-toggle-wrap {
        align-self: center;
    }
}
