:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --surface-bg: rgba(255, 255, 255, 0.7);
    --surface-border: rgba(255, 255, 255, 0.3);
    --text-color: #333;
    --text-muted: #666;
    --shadow-color: rgba(31, 38, 135, 0.37);
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3b82f6;
        --primary-hover: #2563eb;
        --bg-gradient: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
        --surface-bg: rgba(32, 42, 55, 0.6);
        --surface-border: rgba(255, 255, 255, 0.1);
        --text-color: #f3f4f6;
        --text-muted: #9ca3af;
        --shadow-color: rgba(0, 0, 0, 0.5);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    padding: 16px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.app-container {
    width: 100%;
    max-width: 600px;
    /* Glassmorphism */
    background: var(--surface-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    padding: 24px;
    margin-top: 20px;
    animation: slideUp 0.5s ease;
}

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

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(to right, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tabs {
    display: flex;
    background: rgba(0,0,0,0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

@media (prefers-color-scheme: dark) {
    .tabs { background: rgba(255,255,255,0.05); }
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: var(--surface-bg);
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    input, select, textarea {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.02);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

@media (prefers-color-scheme: dark) {
    input:focus, select:focus, textarea:focus {
        background: rgba(255, 255, 255, 0.12);
    }
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

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

/* User Info Section */
.user-info-card {
    display: flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 12px;
}

.user-details .meta-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.user-details .meta-name {
    font-weight: 600;
    color: var(--text-color);
}

.hidden {
    display: none !important;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
