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

body {
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 300;
    background: #1a1a1a;
    color: #e0e0e0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

/* Ambient Visualizer Background */
.visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #1a1a1a;
    opacity: 0;
    transition: opacity 2s ease;
}

.visualizer::before,
.visualizer::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease;
}

.visualizer::before {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(66, 135, 245, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(147, 51, 234, 0.3) 0%, transparent 50%);
}

.visualizer::after {
    background:
        radial-gradient(ellipse at 60% 80%, rgba(20, 184, 166, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 20%, rgba(99, 102, 241, 0.25) 0%, transparent 50%);
}

/* Playing State - Activate visualizer */
.visualizer.playing {
    opacity: 1;
}

.visualizer.playing::before {
    opacity: 1;
    animation: visualizerShift 35s ease-in-out infinite;
}

.visualizer.playing::after {
    opacity: 1;
    animation: visualizerShiftAlt 40s ease-in-out infinite;
}

/* Pulse Effect - Slow, gentle intensity increase */
.visualizer.pulse::before,
.visualizer.pulse::after {
    animation-name: visualizerPulse;
    animation-duration: 3s;
    animation-timing-function: ease-in-out;
}

.container {
    max-width: 600px;
    width: 100%;
    background: #2a2a2a;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid #7d1935;
    position: relative;
}

/* Info Button */
.info-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #666;
    color: white;
    border: none;
    font-family: 'Jost', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}

.info-button:hover {
    background: #777;
    transform: scale(1.05);
}

/* Info Modal */
.info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.info-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-modal-content {
    background: #2a2a2a;
    border-radius: 12px;
    border: 1px solid #7d1935;
    padding: 40px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.info-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #666;
    color: white;
    border: none;
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.info-close-button:hover {
    background: #777;
    transform: scale(1.05);
}

.info-title {
    font-family: 'Jost', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.pronunciation {
    font-size: 1.2rem;
    font-weight: 300;
    color: #999;
}

.info-tagline {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #ccc;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.info-description {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #e0e0e0;
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.info-section-title {
    font-family: 'Jost', sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: #ffffff;
    margin: 32px 0 16px 0;
}

.info-subtitle {
    font-family: 'Jost', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #e0e0e0;
    margin: 20px 0 12px 0;
}

.info-text {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #ccc;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.info-list {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: #ccc;
    line-height: 1.8;
    margin: 0 0 16px 0;
    padding-left: 24px;
}

.info-list li {
    margin-bottom: 8px;
}

.info-tip {
    font-family: 'Jost', sans-serif;
    font-size: 0.95rem;
    font-weight: 300;
    color: #999;
    font-style: italic;
    margin: 16px 0 0 0;
}

.info-cta {
    margin: 16px 0 0 0;
}

.info-link {
    font-family: 'Jost', sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #80BBFF;
    text-decoration: none;
    transition: color 0.2s;
}

.info-link:hover {
    color: #a0d0ff;
    text-decoration: underline;
}

.logo-container {
    text-align: center;
    margin-bottom: 8px;
}

.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
}

.subtitle {
    text-align: center;
    color: #999;
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 40px;
    line-height: 1.5;
}

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

.weather-input {
    display: flex;
    gap: 12px;
    align-items: center;
}

.weather-input label {
    color: #ccc;
    font-size: 1rem;
}

.autocomplete-wrapper {
    flex: 1;
    position: relative;
}

.weather-input input[type="text"] {
    width: 100%;
    padding: 10px 16px;
    font-size: 1rem;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    color: #e0e0e0;
    outline: none;
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
}

.weather-input input[type="text"]:focus {
    border-color: #7d1935;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border: 1px solid #555;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-results.active {
    display: block;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    color: #ccc;
    border-bottom: 1px solid #333;
    transition: background 0.2s;
    font-weight: 400;
}

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

.autocomplete-item:hover,
.autocomplete-item.selected {
    background: #3a3a3a;
    color: #fff;
}

.autocomplete-item-name {
    font-weight: 400;
    color: #e0e0e0;
}

.autocomplete-item-region {
    font-size: 0.85rem;
    color: #999;
    margin-top: 2px;
}

.binaural-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
    background: #333;
    border-radius: 8px;
}

.binaural-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-label {
    color: #e0e0e0;
    font-size: 1rem;
    font-weight: 500;
}

/* Toggle switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: #e0e0e0;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #7d1935;
}

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

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px rgba(125, 25, 53, 0.3);
}

.binaural-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    max-height: 50px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
    margin-top: 16px;
}

.binaural-selector.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.binaural-selector label {
    color: #ccc;
    font-size: 1rem;
    white-space: nowrap;
}

.binaural-selector select {
    flex: 1;
    padding: 10px 16px;
    font-size: 0.95rem;
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 6px;
    color: #e0e0e0;
    cursor: pointer;
    outline: none;
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
}

.binaural-selector select:focus {
    border-color: #7d1935;
}

.binaural-selector select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    padding: 12px 32px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400;
}

.btn-primary {
    background: #3e4095;
    color: white;
}

.btn-primary:hover {
    background: #2f3275;
}

.btn-primary:disabled {
    background: #444;
    color: #666;
    cursor: not-allowed;
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-secondary:hover {
    background: #777;
}

.btn-secondary:disabled {
    background: #444;
    color: #666;
    cursor: not-allowed;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.slider-group label {
    font-size: 1rem;
    color: #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.slider-group label span {
    font-weight: 600;
    color: #4a9eff;
    min-width: 50px;
    text-align: right;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #444;
    outline: none;
    transition: background 0.2s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    transition: background 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    background: #3a8eef;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}

.slider::-moz-range-thumb:hover {
    background: #3a8eef;
}

.weather-status {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 6px;
    padding-bottom: 6px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.weather-status p {
    color: #999;
    font-size: 0.85rem;
    font-weight: 300;
    margin: 0;
}

.status-indicator {
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    background-color: #4ade80;
    opacity: 0;
    transition: opacity 0.5s ease;
    flex-shrink: 0;
}

.status-indicator.active {
    opacity: 1;
    animation: ambientPulse 3s ease-in-out infinite;
}

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

/* Visualizer Animations */
@keyframes visualizerShift {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
    }
    33% {
        filter: hue-rotate(15deg) brightness(1.1);
    }
    66% {
        filter: hue-rotate(-10deg) brightness(0.95);
    }
}

@keyframes visualizerShiftAlt {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
    }
    33% {
        filter: hue-rotate(-15deg) brightness(0.95);
    }
    66% {
        filter: hue-rotate(20deg) brightness(1.1);
    }
}

@keyframes visualizerPulse {
    0% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.15);
    }
    100% {
        filter: brightness(1);
    }
}

/* Accessibility - Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .visualizer.playing::before,
    .visualizer.playing::after {
        animation: none !important;
        filter: none !important;
    }

    .visualizer.pulse::before,
    .visualizer.pulse::after {
        animation: none !important;
    }

    .status-indicator.active {
        animation: none !important;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 24px;
    }

    .logo {
        max-width: 200px;
    }

    .subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}
