:root {
    --bg-base: #090d16;
    --card-bg: rgba(17, 24, 39, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --danger: #f43f5e;
    --danger-bg: rgba(244, 63, 94, 0.12);
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    padding: 20px;
}

.background-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(15, 23, 42, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.card-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.05));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.logo-icon {
    width: 32px;
    height: 32px;
    stroke: var(--primary);
}

h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tag {
    font-size: 11px;
    padding: 2px 7px;
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

.node-status {
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 10px;
    border-radius: 20px;
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
}

.node-status code {
    color: var(--primary);
    font-size: 11px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--danger-bg);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fecdd3;
    font-size: 13px;
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.alert.hidden {
    display: none;
}

.alert-icon {
    width: 20px;
    height: 20px;
    stroke: var(--danger);
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-content strong {
    color: var(--danger);
    display: block;
    margin-bottom: 2px;
}

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

label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    stroke: var(--text-muted);
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 12px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-container input {
    margin-right: 8px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.spinner.hidden {
    display: none;
}

.card-footer {
    margin-top: 26px;
    text-align: center;
    font-size: 11px;
    color: #64748b;
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
}

.copyright {
    margin-top: 6px;
}

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

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