:root {
    /* ITIX Premium Colors */
    --itix-primary: #005B9F;
    --itix-secondary: #00A3E0;
    --bg-dark: #0A0F1C;
    --bg-panel: rgba(16, 24, 43, 0.6);
    --text-main: #FFFFFF;
    --text-muted: #8E9BB0;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-color: rgba(0, 163, 224, 0.4);
    --accent-red: #E63946;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 91, 159, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 163, 224, 0.1), transparent 25%);
    background-attachment: fixed;
}

.app-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 280px;
    padding: 2rem;
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 3rem;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--itix-secondary), var(--itix-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--glow-color);
}

.brand h2 {
    font-weight: 600;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

.brand span {
    font-weight: 300;
    color: var(--itix-secondary);
}

.settings-group h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 1.5rem 0 1rem;
}

.input-field {
    margin-bottom: 1rem;
}

.input-field label {
    display: block;
    font-size: 0.85rem;
    color: #A0B2C6;
    margin-bottom: 0.4rem;
}

.input-field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #FFF;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.input-field input:focus {
    outline: none;
    border-color: var(--itix-secondary);
    background: rgba(0, 163, 224, 0.05);
}

.btn-secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
}

.badge-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-panel);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.dot {
    width: 8px;
    height: 8px;
    background-color: #00E676;
    border-radius: 50%;
    box-shadow: 0 0 8px #00E676;
}

.user-profile {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--itix-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* INTERACTION AREA */
.interaction-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 400px;
}

.voice-orb-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.mic-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--itix-primary), #00305E);
    color: white;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--glow-color);
}

.mic-button.recording {
    background: linear-gradient(135deg, var(--accent-red), #900B1C);
    animation: pulseMic 1.5s infinite;
}

@keyframes pulseMic {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(230, 57, 70, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

.orb-rings {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--itix-secondary);
    opacity: 0;
    pointer-events: none;
}

.orb-rings.active {
    animation: expandRing 2s linear infinite;
}

@keyframes expandRing {
    0% { transform: scale(0.5); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.status-text {
    position: absolute;
    bottom: -30px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 300;
    letter-spacing: 1px;
}

/* DIVIDER */
.divider {
    display: flex;
    align-items: center;
    width: 60%;
    margin: 2rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 2px;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--glass-border);
}

.divider span {
    padding: 0 1rem;
}

/* TEXT INPUT */
.text-input-wrapper {
    width: 80%;
    max-width: 600px;
    display: flex;
    background: var(--bg-panel);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 6px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.text-input-wrapper:focus-within {
    border-color: var(--itix-secondary);
    box-shadow: 0 0 15px rgba(0, 163, 224, 0.2);
}

.text-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 0 20px;
    font-size: 1rem;
    outline: none;
}

.btn-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--itix-secondary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-send:hover {
    background: var(--itix-primary);
}

.btn-send:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
}

/* RESULTS PANEL */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    margin-top: 2rem;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h3 {
    font-weight: 500;
    color: var(--itix-secondary);
}

.route-badge {
    background: rgba(0, 163, 224, 0.15);
    color: var(--itix-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(0, 163, 224, 0.3);
}

.transcription-box {
    background: rgba(255, 255, 255, 0.03);
    border-left: 4px solid var(--itix-primary);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
}

.transcription-box h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.transcription-box p {
    font-size: 1.1rem;
    line-height: 1.5;
    font-style: italic;
}

.json-viewer {
    background: #060913;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #A0B2C6;
    overflow-x: auto;
    max-height: 300px;
    border: 1px solid rgba(255,255,255,0.05);
}
