:root {
    --bg-color: #0c0e14;
    --panel-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 16px;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    z-index: -1;
}

/* Utilities */
.glass {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.hidden { display: none !important; }

/* Header */
header {
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 40px;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
}

.logo span span {
    color: var(--accent-color);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

.status-badge.idle { color: var(--text-secondary); }
.status-badge.connected { color: var(--success); }
.status-badge.calling { color: var(--warning); animation: pulse 2s infinite; }

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

/* Panels */
.panel {
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.panel-header { margin-bottom: 24px; }
.panel-header h2, .panel-header h3 {
    font-family: var(--font-heading);
    margin-bottom: 8px;
}
.panel-header p { color: var(--text-secondary); font-size: 14px; }

/* Inputs & Buttons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0 16px;
    transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

.input-wrapper .icon {
    width: 20px;
    color: var(--text-secondary);
}

.input-wrapper input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 14px 12px;
    width: 100%;
    outline: none;
    font-size: 16px;
}

.input-group {
    display: flex;
    gap: 12px;
}

.input-group .input-wrapper { flex: 1; }

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 24px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.primary-btn:active { transform: translateY(0); }

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
}

.field { margin-bottom: 20px; }
.field label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.select-wrapper {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.select-wrapper select {
    appearance: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 14px 16px;
    width: 100%;
    outline: none;
    font-size: 16px;
    cursor: pointer;
}

.select-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
    width: 18px;
}

/* Feature List */
.feature-list { list-style: none; }
.feature-list li {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    flex-shrink: 0;
}

.feature-text strong { display: block; font-size: 15px; margin-bottom: 2px; }
.feature-text p { font-size: 13px; color: var(--text-secondary); }

/* Call Section */
.accent-border {
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.call-header { margin-bottom: 32px; text-align: center; }
.call-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-color);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.input-wrapper.large { padding: 8px 20px; border-radius: 16px; }
.input-wrapper.large input { font-size: 20px; font-weight: 600; }
.input-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; display: block; }

.call-btn {
    width: 100%;
    padding: 24px;
    margin-top: 32px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.call-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(99, 102, 241, 0.6);
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-text { font-size: 20px; font-weight: 700; font-family: var(--font-heading); }
.btn-icon { font-size: 24px; }

.btn-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

.status-feed {
    margin-top: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    font-family: monospace;
    font-size: 13px;
    height: 100px;
    overflow-y: auto;
}

.feed-item {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.feed-item.active { opacity: 1; color: var(--accent-color); }
.feed-item .time { color: var(--text-secondary); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-content {
    max-width: 450px;
    width: 100%;
    padding: 40px;
    border-radius: 24px;
    text-align: center;
}

.modal-icon { font-size: 48px; margin-bottom: 20px; }
.modal-content p { color: var(--text-secondary); margin: 16px 0 32px; }
.highlight { color: var(--text-primary); font-weight: 700; }

.modal-actions { display: flex; gap: 12px; justify-content: center; }

.ghost-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
}

.pulse { animation: ripple 2s infinite linear; }
@keyframes ripple {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Toasts */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2000;
}

.toast {
    padding: 12px 20px;
    border-radius: 10px;
    background: #1e293b;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    border-left: 4px solid var(--accent-color);
    animation: slideIn 0.3s ease forwards;
}

.toast.error { border-left-color: var(--error); }
.toast.success { border-left-color: var(--success); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}
