:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #f43f5e;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
}

#renderCanvas {
    width: 100%;
    height: 100%;
    touch-action: none;
    outline: none;
}

#ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.screen {
    display: none;
    width: 100%;
    max-width: 400px;
    pointer-events: all;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: block;
}

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

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 4px;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

h2 {
    color: var(--text-main);
    margin-bottom: 16px;
}

.subtitle {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
}

input {
    width: 100%;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.3);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

button {
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.primary-btn {
    background: var(--primary);
    color: white;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

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

.glow-btn {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: white;
    font-size: 1.2rem;
    padding: 18px 40px;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.glow-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.6);
}

#toggle-auth {
    margin-top: 24px;
}

#toggle-auth a {
    color: var(--text-dim);
    font-size: 0.85rem;
    text-decoration: none;
}

#toggle-auth a:hover {
    color: var(--text-main);
}

.message {
    margin-top: 16px;
    font-size: 0.85rem;
}

.message.error { color: var(--accent); }
.message.success { color: #10b981; }

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--glass-border);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
