:root {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e1b4b;
    --bg-color-3: #312e81;
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --secondary: #475569;
    --secondary-hover: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-color-1), var(--bg-color-2), var(--bg-color-3));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

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

.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: -1;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.6);
}

header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.gradient-text {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #a78bfa, #818cf8, #38bdf8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

input[type="text"] {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    outline: none;
}

input[type="text"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

input[type="text"]::placeholder {
    color: #64748b;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) rotate(35deg) scale(0);
    transition: transform 0.5s ease;
}

.btn:active::after {
    transform: translate(-50%, -50%) rotate(35deg) scale(1);
    transition: transform 0s;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px 0 rgba(129, 140, 248, 0.39);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.5);
}

.btn-secondary {
    background: var(--secondary);
    color: #ffffff;
}

.btn-secondary:hover {
    background: var(--secondary-hover);
    transform: translateY(-2px);
}

/* App specific layouts */
.app-container {
    width: 100vw;
    height: 100vh;
    display: grid;
    grid-template-columns: 350px 1fr;
    background: var(--bg-color-1);
}

.sidebar {
    background: var(--glass-bg);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.main-content {
    padding: 2rem;
    overflow-y: auto;
    position: relative;
}

/* Connection status dot */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.status-dot.connected {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.status-dot.connecting {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
