:root {
    --primary: #00f2ff;
    --secondary: #7000ff;
    --bg: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-muted: #b0b0b0;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    background: var(--bg);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(112, 0, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 242, 255, 0.15) 0%, transparent 40%);
    color: var(--text);
    font-family: var(--font-main);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 2rem;
    z-index: 10;
}

.header {
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    /* Fixed compatibility */
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

/* ... existing code ... */

/* Visualizer Canvas */
#visualizer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    pointer-events: none;
    z-index: 0;
}

.header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Voice Orb Section */
.orb-container {
    position: relative;
    width: 250px;
    height: 250px;
    margin: 0 auto 3rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.orb-container:hover {
    transform: scale(1.05);
}

.orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(0, 242, 255, 0.5);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.orb::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 30%, rgba(0, 0, 0, 0.3) 100%);
}

.orb i {
    font-size: 3rem;
    color: white;
    z-index: 3;
}

.pulse-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    z-index: 1;
}

.ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite ease-out;
    opacity: 0;
}

.ring:nth-child(2) {
    animation-delay: 0.5s;
}

.ring:nth-child(3) {
    animation-delay: 1s;
}

/* Status & Output */
.status-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    min-height: 120px;
    margin-bottom: 2rem;
    text-align: left;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.status-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.output-text {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text);
}

.listening-indicator {
    display: none;
    font-size: 0.9rem;
    color: var(--primary);
    margin-top: 1rem;
}

.listening-indicator span {
    display: inline-block;
    animation: bounce 1s infinite ease-in-out;
}

.listening-indicator span:nth-child(2) {
    animation-delay: 0.1s;
}

.listening-indicator span:nth-child(3) {
    animation-delay: 0.2s;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Active State */
.is-listening .orb {
    animation: orbGlow 1.5s infinite alternate;
}

.is-listening .listening-indicator {
    display: block;
}

@keyframes orbGlow {
    from {
        box-shadow: 0 0 30px rgba(0, 242, 255, 0.4);
    }

    to {
        box-shadow: 0 0 70px rgba(112, 0, 255, 0.8);
    }
}

.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.settings-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.settings-body {
    padding: 1rem;
    display: none;
    /* Initially hidden */
    border-top: 1px solid var(--glass-border);
}

.settings-body.active {
    display: block;
}

.input-group {
    margin-bottom: 1rem;
    text-align: left;
}

.input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.4rem;
}

.input-group input,
.input-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary);
}

.input-group small a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.7rem;
}

.btn-control {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}