/* CSS Variables for Theming */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e5e5e5;
    --accent-color: #2196f3;
    --accent-bg: #e8f4fd;
    --hover-bg: #f0f0f0;
    --bg-primary-rgb: 255, 255, 255;
    --bg-secondary-rgb: 250, 250, 250;
}

[data-theme="dark"] {
    --bg-primary: #1e1e1e;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #121212;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #404040;
    --hover-bg: #3a3a3a;
    --bg-primary-rgb: 30, 30, 30;
    --bg-secondary-rgb: 45, 45, 45;
}

/* Color Themes */
[data-color="blue"] {
    --accent-color: #2196f3;
    --accent-bg: #e8f4fd;
    --accent-color-rgb: 33, 150, 243;
}
[data-color="green"] {
    --accent-color: #4caf50;
    --accent-bg: #e8f5e8;
    --accent-color-rgb: 76, 175, 80;
}
[data-color="red"] {
    --accent-color: #f44336;
    --accent-bg: #fdeaea;
    --accent-color-rgb: 244, 67, 54;
}
[data-color="purple"] {
    --accent-color: #9c27b0;
    --accent-bg: #f3e5f5;
    --accent-color-rgb: 156, 39, 176;
}
[data-color="orange"] {
    --accent-color: #ff9800;
    --accent-bg: #fff3e0;
    --accent-color-rgb: 255, 152, 0;
}
[data-color="pink"] {
    --accent-color: #e91e63;
    --accent-bg: #fce4ec;
    --accent-color-rgb: 233, 30, 99;
}
[data-color="teal"] {
    --accent-color: #009688;
    --accent-bg: #e0f2f1;
    --accent-color-rgb: 0, 150, 136;
}
[data-color="yellow"] {
    --accent-color: #ffc107;
    --accent-bg: #fffde7;
    --accent-color-rgb: 255, 193, 7;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-tertiary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 900px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease;
}

/* Dark mode app container */
[data-theme="dark"] .app-container {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background: #ff5f57; }
.control.yellow { background: #ffbd2e; }
.control.green { background: #28ca42; }

.app-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.presets-btn, .menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.presets-btn:hover, .menu-btn:hover {
    background: var(--hover-bg);
}

/* Status Bar */
.status-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.playback-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.status-icon {
    font-size: 16px;
}

/* Audio Visualizer */
.audio-visualizer {
    display: flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.audio-visualizer.active {
    opacity: 1;
}

.visualizer-bar {
    width: 3px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: visualizerPulse 1s ease-in-out infinite;
}

.visualizer-bar:nth-child(1) { animation-delay: 0s; }
.visualizer-bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer-bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes visualizerPulse {
    0%, 100% { height: 8px; }
    50% { height: 16px; }
}

/* Smart Suggestions */
.smart-suggestions {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 300px;
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    0% { transform: translateX(-50%) translateY(-20px); opacity: 0; }
    100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.suggestions-content {
    position: relative;
}

.suggestions-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: block;
}

.suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-item {
    padding: 6px 12px;
    background: var(--accent-bg);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.05);
}

.close-suggestions {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-suggestions:hover {
    background: #f44336;
    transform: scale(1.1);
}

/* Break Reminders Styles */
.break-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.break-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.break-toggle input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 40px;
    height: 20px;
    background: var(--border-color);
    border-radius: 20px;
    position: relative;
    transition: background 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.break-toggle input:checked + .toggle-slider {
    background: var(--accent-color);
}

.break-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 13px;
    color: var(--text-primary);
}

.break-interval-setting {
    margin-left: 52px;
}

.break-interval-setting label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.break-interval-setting select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
}

/* Session Stats Styles */
.stats-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-color);
}

/* Stats Modal Styles */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.stats-modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.stats-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 20px;
}

.close-stats {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--hover-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-stats:hover {
    background: #f44336;
    color: white;
}

.stats-body {
    padding: 24px;
}

.stats-section {
    margin-bottom: 32px;
}

.stats-section:last-child {
    margin-bottom: 0;
}

.stats-section h3 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.favorite-sounds, .popular-combinations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sound-rank, .combination-rank {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.rank-number {
    background: var(--accent-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.rank-name {
    flex: 1;
    margin-left: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.rank-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.usage-patterns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pattern-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.pattern-item:last-child {
    border-bottom: none;
}

.pattern-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.pattern-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.loading {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
}

/* Break Notification Styles */
.break-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-primary);
    border: 2px solid var(--accent-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    min-width: 320px;
    max-width: 400px;
    animation: breakSlideIn 0.3s ease;
}

@keyframes breakSlideIn {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.break-content {
    text-align: center;
}

.break-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.break-text h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.break-text p {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.4;
}

.break-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.break-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.break-btn.primary {
    background: var(--accent-color);
    color: white;
}

.break-btn.primary:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

.break-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.break-btn.secondary:hover {
    background: var(--hover-bg);
}

.break-btn.tertiary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.break-btn.tertiary:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

/* Main Content */
.main-content {
    padding: 40px 24px;
    min-height: 400px;
}

/* Sound Grid */
.sound-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.sound-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px 16px 40px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.sound-category:hover {
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.sound-category.playing {
    background: var(--accent-bg);
    border-color: var(--accent-color);
}

/* Paused state - subtle dimming */
.sound-category.playing.paused {
    opacity: 0.6;
    background: rgba(var(--accent-color-rgb, 33, 150, 243), 0.1);
}

/* Dark mode improvements for sound categories */
[data-theme="dark"] .sound-category {
    background: #2a2a2a;
    border: 2px solid #404040;
}

[data-theme="dark"] .sound-category:hover {
    background: #353535;
    border-color: #505050;
    transform: translateY(-2px);
}

[data-theme="dark"] .sound-category.playing {
    background: rgba(var(--accent-color-rgb), 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 12px rgba(var(--accent-color-rgb), 0.3);
}

/* Dark mode accent backgrounds */
[data-theme="dark"][data-color="blue"] { --accent-bg: rgba(33, 150, 243, 0.15); }
[data-theme="dark"][data-color="green"] { --accent-bg: rgba(76, 175, 80, 0.15); }
[data-theme="dark"][data-color="red"] { --accent-bg: rgba(244, 67, 54, 0.15); }
[data-theme="dark"][data-color="purple"] { --accent-bg: rgba(156, 39, 176, 0.15); }
[data-theme="dark"][data-color="orange"] { --accent-bg: rgba(255, 152, 0, 0.15); }
[data-theme="dark"][data-color="pink"] { --accent-bg: rgba(233, 30, 99, 0.15); }
[data-theme="dark"][data-color="teal"] { --accent-bg: rgba(0, 150, 136, 0.15); }
[data-theme="dark"][data-color="yellow"] { --accent-bg: rgba(255, 193, 7, 0.15); }

.sound-icon {
    font-size: 32px;
    margin-bottom: 4px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-icon svg {
    width: 100%;
    height: 100%;
    color: var(--accent-color);
    transition: all 0.2s ease;
}

.sound-category.playing .sound-icon {
    filter: grayscale(0%);
    opacity: 1;
}

/* Dark mode improvements for sound icons */
[data-theme="dark"] .sound-icon {
    opacity: 0.8;
    filter: grayscale(100%) brightness(1.2) contrast(1.1);
}

[data-theme="dark"] .sound-category.playing .sound-icon {
    filter: grayscale(0%) brightness(1.3) contrast(1.2);
    opacity: 1;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .sound-category:hover .sound-icon {
    filter: grayscale(50%) brightness(1.4) contrast(1.2);
    opacity: 0.9;
}

.sound-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.2;
}

/* Individual Volume Controls */
.individual-volume {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 8px;
    backdrop-filter: blur(10px);
}

.sound-category:hover .individual-volume,
.sound-category.playing .individual-volume {
    opacity: 1;
    visibility: visible;
}

.individual-slider {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 2px;
    appearance: none;
    margin-bottom: 4px;
}

.individual-slider::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.individual-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-value {
    font-size: 10px;
    color: white;
    text-align: center;
    display: block;
    font-weight: 500;
}

/* Dark mode adjustments for individual volume */
[data-theme="dark"] .individual-volume {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .individual-slider {
    background: rgba(255, 255, 255, 0.2);
}

/* Sleep Timer Styles */
.timer-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.timer-option {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 50px;
}

.timer-option:hover {
    background: var(--hover-bg);
}

.timer-option.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timer-btn {
    padding: 8px 12px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.timer-btn:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

.timer-btn.cancel {
    background: #f44336;
    border-color: #f44336;
}

.timer-btn.cancel:hover {
    background: #fdeaea;
    color: #f44336;
}

.timer-display {
    margin-top: 12px;
    padding: 8px;
    background: var(--accent-bg);
    border-radius: 6px;
    text-align: center;
}

.timer-text {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

#timeRemaining {
    font-family: monospace;
    font-weight: bold;
    color: var(--accent-color);
}

#customMinutes {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
    width: 100%;
}

/* Timer active state */
.timer-active .status-bar {
    background: linear-gradient(90deg, var(--accent-bg), var(--bg-secondary));
}

.timer-active .status-icon {
    animation: timerPulse 2s infinite;
}

@keyframes timerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Focus Mode Styles */
.focus-mode .header {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.focus-mode .header:hover {
    opacity: 0.3;
}

.focus-mode .status-bar {
    background: transparent;
    border: none;
    padding: 8px;
}

.focus-mode .controls {
    background: rgba(var(--bg-secondary-rgb), 0.8);
    backdrop-filter: blur(10px);
    border: none;
    padding: 16px;
}

.focus-mode .sound-category {
    background: rgba(var(--bg-secondary-rgb), 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.focus-mode .sound-category:hover {
    background: rgba(var(--bg-secondary-rgb), 0.8);
}

.focus-mode .sound-category.playing {
    background: rgba(var(--accent-color-rgb), 0.2);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(var(--accent-color-rgb), 0.3);
}

.focus-mode .main-content {
    padding: 20px;
}

.focus-mode .app-container {
    background: linear-gradient(135deg,
        rgba(var(--bg-primary-rgb), 0.95),
        rgba(var(--bg-secondary-rgb), 0.9));
    backdrop-filter: blur(20px);
}

/* Focus mode background animation */
.focus-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(var(--accent-color-rgb), 0.05),
        rgba(var(--accent-color-rgb), 0.02),
        rgba(var(--accent-color-rgb), 0.05));
    background-size: 400% 400%;
    animation: focusGradient 20s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes focusGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Focus mode exit hint */
.focus-mode .focus-exit-hint {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
    z-index: 1000;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Sound Waveform Animations */
.sound-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 12px;
    overflow: hidden;
}

.sound-category.playing::before {
    opacity: 0.3;
}

/* Rain Animation - Only when playing */
.sound-category[data-sound="rain"].playing::before {
    background: linear-gradient(180deg, transparent 0%, rgba(33, 150, 243, 0.1) 100%);
    background-size: 20px 20px;
    animation: rainDrop 1.5s linear infinite;
}

@keyframes rainDrop {
    0% { background-position: 0 -20px; }
    100% { background-position: 0 100%; }
}

/* Storm Animation - Only when playing */
.sound-category[data-sound="storm"].playing::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(156, 39, 176, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(156, 39, 176, 0.2) 0%, transparent 50%);
    animation: stormFlash 3s ease-in-out infinite;
}

@keyframes stormFlash {
    0%, 90%, 100% { opacity: 0.1; }
    5%, 15% { opacity: 0.6; }
}

/* Wind Animation */
.sound-category[data-sound="wind"]::before {
    background: linear-gradient(45deg,
        transparent 25%,
        rgba(0, 150, 136, 0.1) 25%,
        rgba(0, 150, 136, 0.1) 50%,
        transparent 50%);
    background-size: 30px 30px;
    animation: windFlow 4s linear infinite;
}

@keyframes windFlow {
    0% { transform: translateX(-30px); }
    100% { transform: translateX(30px); }
}

/* Waves Animation */
.sound-category[data-sound="waves"]::before {
    background:
        radial-gradient(ellipse at center bottom, rgba(33, 150, 243, 0.2) 0%, transparent 70%);
    animation: waveMotion 3s ease-in-out infinite;
}

@keyframes waveMotion {
    0%, 100% { transform: scaleY(1) translateY(0); }
    50% { transform: scaleY(1.2) translateY(-5px); }
}

/* Stream Animation */
.sound-category[data-sound="stream"]::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(33, 150, 243, 0.15) 50%,
        transparent 100%);
    background-size: 40px 100%;
    animation: streamFlow 2s linear infinite;
}

@keyframes streamFlow {
    0% { background-position: -40px 0; }
    100% { background-position: 100% 0; }
}

/* Birds Animation */
.sound-category[data-sound="birds"]::before {
    background:
        radial-gradient(circle at 30% 30%, rgba(76, 175, 80, 0.2) 2px, transparent 2px),
        radial-gradient(circle at 70% 60%, rgba(76, 175, 80, 0.2) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: birdsChirp 2.5s ease-in-out infinite;
}

@keyframes birdsChirp {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Fire/Fireplace Animation */
.sound-category[data-sound="fireplace"]::before {
    background:
        radial-gradient(ellipse at bottom, rgba(255, 152, 0, 0.3) 0%, transparent 70%);
    animation: fireFlicker 1.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    0% { transform: scaleY(1) scaleX(1); }
    100% { transform: scaleY(1.1) scaleX(0.95); }
}

/* White/Pink Noise Animation */
.sound-category[data-sound="white-noise"]::before,
.sound-category[data-sound="pink-noise"]::before {
    background:
        repeating-linear-gradient(90deg,
            transparent 0px,
            rgba(var(--accent-color-rgb), 0.1) 1px,
            transparent 2px);
    animation: noiseStatic 0.1s linear infinite;
}

@keyframes noiseStatic {
    0% { transform: translateX(0); }
    100% { transform: translateX(2px); }
}

/* Urban sounds (train, city, coffee-shop) */
.sound-category[data-sound="train"]::before,
.sound-category[data-sound="city"]::before,
.sound-category[data-sound="coffee-shop"]::before {
    background:
        linear-gradient(0deg, transparent 40%, rgba(var(--accent-color-rgb), 0.1) 50%, transparent 60%);
    background-size: 100% 20px;
    animation: urbanPulse 2s ease-in-out infinite;
}

@keyframes urbanPulse {
    0%, 100% { background-position: 0 0; }
    50% { background-position: 0 10px; }
}

/* Boat Animation */
.sound-category[data-sound="boat"]::before {
    background:
        radial-gradient(ellipse at center, rgba(33, 150, 243, 0.2) 30%, transparent 70%);
    animation: boatRock 4s ease-in-out infinite;
}

@keyframes boatRock {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

/* Summer Night Animation */
.sound-category[data-sound="summer-night"]::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 193, 7, 0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 80%, rgba(255, 193, 7, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: nightTwinkle 3s ease-in-out infinite;
}

@keyframes nightTwinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.5; }
}

/* Particle Effects */
.sound-category.playing::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: 12px;
    overflow: hidden;
}

/* Rain Particles */
.sound-category[data-sound="rain"].playing::after {
    background-image:
        radial-gradient(circle at 20% 10%, rgba(33, 150, 243, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 60% 30%, rgba(33, 150, 243, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(33, 150, 243, 0.6) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: rainParticles 1s linear infinite;
}

@keyframes rainParticles {
    0% { transform: translateY(-30px); }
    100% { transform: translateY(100%); }
}

/* Fire Particles */
.sound-category[data-sound="fireplace"].playing::after {
    background-image:
        radial-gradient(circle at 30% 80%, rgba(255, 152, 0, 0.8) 2px, transparent 2px),
        radial-gradient(circle at 70% 90%, rgba(255, 87, 34, 0.8) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: fireParticles 2s ease-in-out infinite;
}

@keyframes fireParticles {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-50px) scale(0.5); opacity: 0; }
}

/* Wave Particles */
.sound-category[data-sound="waves"].playing::after {
    background-image:
        radial-gradient(ellipse at 25% 50%, rgba(33, 150, 243, 0.4) 3px, transparent 3px),
        radial-gradient(ellipse at 75% 60%, rgba(33, 150, 243, 0.4) 2px, transparent 2px);
    background-size: 50px 20px;
    animation: waveParticles 3s ease-in-out infinite;
}

@keyframes waveParticles {
    0%, 100% { transform: translateX(0) scaleX(1); }
    50% { transform: translateX(10px) scaleX(1.2); }
}

/* Wind Particles */
.sound-category[data-sound="wind"].playing::after {
    background-image:
        linear-gradient(45deg, rgba(0, 150, 136, 0.3) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(0, 150, 136, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: windParticles 2s linear infinite;
}

@keyframes windParticles {
    0% { transform: translateX(-20px) rotate(0deg); }
    100% { transform: translateX(100%) rotate(360deg); }
}

/* Bird Particles */
.sound-category[data-sound="birds"].playing::after {
    background-image:
        radial-gradient(circle at 30% 40%, rgba(76, 175, 80, 0.6) 1px, transparent 1px),
        radial-gradient(circle at 70% 30%, rgba(76, 175, 80, 0.6) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: birdParticles 3s ease-in-out infinite;
}

@keyframes birdParticles {
    0%, 100% { transform: translateY(0) scale(1); }
    25% { transform: translateY(-10px) scale(1.1); }
    75% { transform: translateY(5px) scale(0.9); }
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.control-btn {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--hover-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.control-btn:hover {
    background: var(--border-color);
    transform: scale(1.05);
}

.play-btn {
    background: var(--accent-color);
    color: white;
    width: 56px;
    height: 56px;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.play-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.play-btn:hover::before {
    left: 100%;
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.play-btn.playing {
    background: #ff5722;
    animation: pulse 2s infinite;
}

.play-btn.playing:hover {
    background: #e64a19;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 87, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 87, 34, 0); }
}

/* Dark mode control buttons */
[data-theme="dark"] .control-btn {
    background: #3a3a3a;
    border: 1px solid #505050;
}

[data-theme="dark"] .control-btn:hover {
    background: #454545;
    border-color: #606060;
}

/* Quick Actions */
.quick-actions-divider {
    width: 1px;
    height: 30px;
    background: var(--border-color);
    margin: 0 8px;
}

.quick-action-btn {
    opacity: 0.7;
    font-size: 16px;
}

.quick-action-btn:hover {
    opacity: 1;
}

/* Theme Controls */
.theme-controls {
    display: flex;
    gap: 12px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
}

.theme-btn {
    font-size: 18px;
    opacity: 0.8;
}

.theme-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.accent-btn {
    position: relative;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-bg));
    border: 2px solid var(--accent-color);
    overflow: hidden;
}

.accent-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px rgba(var(--accent-color-rgb), 0.5);
}

.accent-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 16px rgba(var(--accent-color-rgb), 0.4);
}

.accent-indicator {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-color) 30%, transparent 70%);
    opacity: 0.8;
}

/* Color Picker Panel */
.color-picker-panel {
    position: absolute;
    bottom: 90px;
    right: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    display: none;
    z-index: 1000;
}

.color-picker-panel.show {
    display: block;
}

.color-picker-header {
    margin-bottom: 16px;
}

.color-picker-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.color-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.color-option {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--color), var(--color-light));
}

.color-option.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-option:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Color definitions */
.color-option.blue {
    --color: #2196F3;
    --color-light: #64B5F6;
}

.color-option.green {
    --color: #4CAF50;
    --color-light: #81C784;
}

.color-option.red {
    --color: #F44336;
    --color-light: #E57373;
}

.color-option.purple {
    --color: #9C27B0;
    --color-light: #BA68C8;
}

.color-option.orange {
    --color: #FF9800;
    --color-light: #FFB74D;
}

.color-option.pink {
    --color: #E91E63;
    --color-light: #F06292;
}

.color-option.teal {
    --color: #009688;
    --color-light: #4DB6AC;
}

.color-option.yellow {
    --color: #FFC107;
    --color-light: #FFD54F;
}

/* Volume Slider */
.volume-slider-container {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
}

.volume-slider-container.show {
    display: block;
}

.volume-slider {
    width: 200px;
    height: 4px;
    background: #ddd;
    outline: none;
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #2196f3;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #2196f3;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Audio Container */
.audio-container {
    display: none;
}

/* Simple Settings Panel */
.settings-panel {
    position: absolute;
    bottom: 90px;
    right: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 400px;
    max-height: 70vh;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.settings-panel.show {
    display: block;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.settings-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.close-settings {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--hover-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.close-settings:hover {
    background: #f44336;
    color: white;
}

.settings-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0;
}

/* Settings Sections */
.settings-section {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
}

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

.section-title {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 229, 229, 229), 0.3);
}

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

.setting-info {
    flex: 1;
    margin-right: 16px;
}

.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setting-desc {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Simple Toggle Switch */
.simple-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.simple-toggle.mini {
    width: 32px;
    height: 18px;
}

.simple-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.simple-toggle .toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.simple-toggle .toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.simple-toggle.mini .toggle-slider::before {
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
}

.simple-toggle input:checked + .toggle-slider {
    background: var(--accent-color);
}

.simple-toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.simple-toggle.mini input:checked + .toggle-slider::before {
    transform: translateX(14px);
}

/* Setting Buttons */
.setting-button {
    padding: 6px 12px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    background: var(--accent-color);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.setting-button:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

.setting-button.danger {
    border-color: #f44336;
    background: #f44336;
}

.setting-button.danger:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* Setting Select */
.setting-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    min-width: 120px;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

.color-option:hover {
    transform: scale(1.05);
}

/* Clean Minimal Sound Library */
.sounds-grid {
    margin-top: 16px;
    padding: 0;
}

.sound-category-group {
    margin-bottom: 24px;
    padding: 0;
    background: transparent;
    border: none;
}

.sound-category-group:last-child {
    margin-bottom: 0;
}

.sound-category-group h5 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.sound-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
}

.sound-toggle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.sound-toggle-item:hover {
    background: var(--hover-bg);
    border-radius: 6px;
    padding: 12px 8px;
}

.sound-emoji {
    display: none;
}

.sound-toggle-item .sound-name {
    flex: 1;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    margin-right: 12px;
    transition: color 0.2s ease;
}

.sound-toggle-item:hover .sound-name {
    color: var(--accent-color);
}

.sound-toggle-item .simple-toggle {
    flex-shrink: 0;
}

/* Active/Enabled sound toggle item */
.sound-toggle-item:has(.simple-toggle input:checked) {
    background: var(--accent-bg);
    border-radius: 6px;
    padding: 12px 8px;
}

.sound-toggle-item:has(.simple-toggle input:checked) .sound-name {
    color: var(--accent-color);
    font-weight: 600;
}

/* Disabled sound toggle item */
.sound-toggle-item:has(.simple-toggle input:not(:checked)) .sound-name {
    color: var(--text-secondary);
}

/* About Section */
.about-content {
    padding: 0;
}

.about-text h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.about-text p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.features-list {
    margin-bottom: 16px;
}

.feature-item {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    padding-left: 4px;
}

.app-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.version {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.credits {
    font-size: 11px;
    color: var(--accent-color);
    font-weight: 500;
}

.setting-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.setting-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(var(--accent-color-rgb, 33, 150, 243), 0.15);
    transform: translateY(-2px);
}

.setting-card.danger {
    border-color: #f44336;
}

.setting-card.danger:hover {
    border-color: #f44336;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.15);
}

.card-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background: var(--accent-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.setting-card.danger .card-icon {
    background: rgba(244, 67, 54, 0.1);
}

.card-content {
    flex: 1;
}

.card-content h4 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.card-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

/* Modern Toggle Switch */
.modern-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.modern-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 28px;
    transition: all 0.3s ease;
}

.toggle-track::before {
    content: '';
    position: absolute;
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modern-toggle input:checked + .toggle-track {
    background: var(--accent-color);
}

.modern-toggle input:checked + .toggle-track::before {
    transform: translateX(20px);
}

/* Card Buttons */
.card-button {
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    background: var(--accent-color);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.card-button:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
    transform: scale(1.05);
}

.card-button.danger {
    border-color: #f44336;
    background: #f44336;
}

.card-button.danger:hover {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* Color Grid */
.color-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-dot.active {
    border-color: var(--text-primary);
    transform: scale(1.2);
}

.color-dot:hover {
    transform: scale(1.1);
}

/* Card Select */
.card-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
}

/* Timer Quick Buttons */
.timer-quick-buttons {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.timer-btn {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.timer-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.timer-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Sounds Section */
.sounds-section {
    max-height: 50vh;
    overflow-y: auto;
}

.sounds-section h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.sounds-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.sound-toggle-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sound-toggle-card:hover {
    border-color: var(--accent-color);
    background: var(--accent-bg);
}

.sound-emoji {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sound-toggle-card .sound-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Mini Toggle */
.mini-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    cursor: pointer;
}

.mini-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mini-track {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 18px;
    transition: all 0.3s ease;
}

.mini-track::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.mini-toggle input:checked + .mini-track {
    background: var(--accent-color);
}

.mini-toggle input:checked + .mini-track::before {
    transform: translateX(14px);
}

.settings-section {
    border-bottom: 1px solid var(--border-color);
}

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

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px 24px;
    background: var(--bg-tertiary);
}

.section-icon {
    font-size: 20px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 229, 229, 229), 0.5);
    transition: background-color 0.2s ease;
}

.setting-item:hover {
    background: var(--hover-bg);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.setting-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 24px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Action Buttons */
.action-button {
    padding: 8px 16px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    background: var(--accent-color);
    color: white;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-button:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

.action-button.danger {
    border-color: #f44336;
    background: #f44336;
}

.action-button.danger:hover {
    background: #fdeaea;
    color: #f44336;
}

.action-button.cancel {
    background: #f44336;
    border-color: #f44336;
}

.action-button.cancel:hover {
    background: #fdeaea;
    color: #f44336;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option.active {
    border-color: var(--text-primary);
    transform: scale(1.1);
}

/* Setting Select */
.setting-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
}

/* Timer Controls */
.timer-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.timer-options {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.timer-option {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.timer-option:hover {
    background: var(--hover-bg);
}

.timer-option.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Sounds Management */
.sounds-grid {
    padding: 0 24px 24px 24px;
}

.sound-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0 12px 0;
    margin-top: 16px;
    border-bottom: 1px solid var(--border-color);
}

.sound-category-header:first-child {
    margin-top: 0;
}

.category-icon {
    font-size: 16px;
}

.category-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sound-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(var(--border-color-rgb, 229, 229, 229), 0.3);
}

.sound-toggle-item:last-child {
    border-bottom: none;
}

.sound-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sound-toggle-item .sound-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sound-toggle-item .sound-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.sound-toggle-item .toggle-switch {
    width: 36px;
    height: 20px;
}

.sound-toggle-item .toggle-slider::before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}

.sound-toggle-item .toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* Timer Display */
.timer-display {
    margin-top: 12px;
    padding: 8px 12px;
    background: var(--accent-bg);
    border-radius: 6px;
    text-align: center;
}

.timer-text {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Custom Minutes Input */
#customMinutesInput {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
    width: 80px;
    margin-top: 8px;
}

/* Animation Controls */
.waveform-disabled .sound-category::before {
    display: none !important;
}

.particles-disabled .sound-category::after {
    display: none !important;
}

.animations-disabled .visualizer-bar,
.animations-disabled .focus-mode::before {
    animation: none !important;
}

.animations-disabled .sound-category {
    transition: none !important;
}

.animations-disabled .individual-volume,
.animations-disabled .toggle-slider,
.animations-disabled .action-button {
    transition: none !important;
}

/* Empty Sound State */
.empty-sound-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    grid-column: 1 / -1;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    margin: 20px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.empty-sound-state h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.empty-sound-state p {
    margin: 0 0 20px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.enable-sounds-btn {
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.enable-sounds-btn:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-panel {
        width: 100vw;
        right: -100vw;
    }

    .settings-panel.show {
        right: 0;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .timer-controls {
        width: 100%;
    }

    .color-picker {
        justify-content: flex-start;
    }
}

.theme-options, .color-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-option, .color-option {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.theme-option:hover, .color-option:hover {
    background: var(--hover-bg);
}

.theme-option.active, .color-option.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.color-option.blue { background: #2196f3; }
.color-option.green { background: #4caf50; }
.color-option.red { background: #f44336; }
.color-option.purple { background: #9c27b0; }
.color-option.orange { background: #ff9800; }
.color-option.pink { background: #e91e63; }
.color-option.teal { background: #009688; }
.color-option.yellow { background: #ffc107; }

.color-option.active::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Presets Panel */
.presets-panel {
    position: absolute;
    top: 60px;
    right: 80px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
}

.presets-panel.show {
    display: block;
}

.preset-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preset-option {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: left;
}

.preset-option:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.save-preset-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    background: var(--accent-color);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.save-preset-btn:hover {
    background: var(--accent-bg);
    color: var(--accent-color);
}

/* Menu Panel */
.menu-panel {
    position: absolute;
    top: 60px;
    right: 24px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 280px;
    display: none;
    z-index: 1000;
}

.menu-panel.show {
    display: block;
}

.menu-section {
    margin-bottom: 20px;
}

.menu-section:last-child {
    margin-bottom: 0;
}

.menu-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.menu-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.menu-content p {
    margin-bottom: 4px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.shortcut-key {
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: var(--text-primary);
}

.shortcut-desc {
    color: var(--text-secondary);
    font-size: 12px;
}

.menu-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-action-btn {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    text-align: left;
}

.menu-action-btn:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sound-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .sound-category {
        padding: 16px 12px;
    }
    
    .sound-icon {
        font-size: 28px;
    }
    
    .sound-label {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .presets-panel {
        right: 16px;
        left: auto;
        min-width: 180px;
    }

    .menu-panel {
        right: 16px;
        left: auto;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .sound-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .main-content {
        padding: 24px 16px;
    }

    .header {
        padding: 12px 16px;
    }

    .presets-panel, .menu-panel {
        right: 8px;
        left: 8px;
        min-width: auto;
        max-width: calc(100vw - 32px);
    }
}
