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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0a1612 0%, #1a2f23 50%, #0f1e16 100%);
    min-height: 100vh;
    color: #e0e0e0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.screen {
    display: none;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: block;
}

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

/* Login Screen */
#login-screen .container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Card */
.card {
    background: linear-gradient(145deg, #1a2f23 0%, #0f1e16 100%);
    border-radius: 16px;
    padding: 35px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(16, 185, 129, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    margin-bottom: 20px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(16, 185, 129, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#login-screen .card {
    max-width: 450px;
    width: 100%;
}

h1 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: #9ca3af;
    margin-bottom: 30px;
    font-size: 15px;
    font-weight: 500;
}

/* Form */
.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #d1d5db;
    font-size: 14px;
    letter-spacing: 0.2px;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(10, 22, 18, 0.6);
    color: #e5e7eb;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: #10b981;
    background: rgba(10, 22, 18, 0.8);
    box-shadow:
        0 0 0 3px rgba(16, 185, 129, 0.1),
        0 4px 12px rgba(16, 185, 129, 0.15);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder {
    color: #6b7280;
}

input[readonly] {
    background-color: rgba(10, 22, 18, 0.4);
    cursor: not-allowed;
    border-color: rgba(16, 185, 129, 0.1);
}

small {
    display: block;
    margin-top: 6px;
    color: #9ca3af;
    font-size: 12px;
}

small a {
    color: #10b981;
    text-decoration: none;
    transition: color 0.3s ease;
}

small a:hover {
    color: #34d399;
    text-decoration: underline;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    width: 100%;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

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

.btn-secondary {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Error Messages */
.error-message {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #fca5a5;
    padding: 14px 16px;
    border-radius: 10px;
    margin-top: 16px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 14px;
}

.success-message {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #6ee7b7;
    padding: 14px 16px;
    border-radius: 10px;
    margin-top: 16px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 14px;
}

/* Hint */
.hint {
    margin-top: 24px;
    padding: 18px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    border: 1px solid rgba(16, 185, 129, 0.15);
    color: #d1d5db;
}

.hint code {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
}

/* Navbar */
.navbar {
    background: linear-gradient(145deg, #1a2f23 0%, #0f1e16 100%);
    padding: 18px 35px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(16, 185, 129, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-radius: 16px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.navbar-brand h2 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 26px;
    font-weight: 700;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.navbar-user span {
    color: #d1d5db;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Dashboard */
.dashboard {
    display: grid;
    gap: 24px;
}

h3 {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 18px;
    font-size: 22px;
    font-weight: 700;
}

/* API Key */
.api-key-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.api-key-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 16px 18px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 14px;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    padding: 14px;
    background: rgba(16, 185, 129, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    transition: all 0.3s ease;
}

.info-item:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
}

.info-item label {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 15px;
    color: #e5e7eb;
    font-weight: 600;
}

/* Instructions */
.instructions {
    margin-left: 24px;
    line-height: 1.9;
    color: #d1d5db;
}

.instructions li {
    margin-bottom: 12px;
    position: relative;
}

.instructions li::marker {
    color: #10b981;
    font-weight: bold;
}

.instructions strong {
    color: #10b981;
}

/* Status Message */
.status-message {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
}

.status-message.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-message.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a1612;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669 0%, #047857 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .api-key-container {
        flex-direction: column;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 28px;
    }

    .card {
        padding: 25px;
    }
}
