:root {
    --cyber-red: #ff0040;
    --cyber-red-glow: rgba(255, 0, 64, 0.5);
    --cyber-dark: #0a0a0f;
    --cyber-darker: #050508;
    --cyber-gray: #1a1a24;
    --cyber-light: #e0e0e0;
    --glass-bg: rgba(10, 10, 15, 0.85);
    --glass-border: rgba(255, 0, 64, 0.3);
    --glass-hover: rgba(255, 0, 64, 0.1);
    --text-primary: #e0e0e0;
    --text-secondary: #999;
    --text-tertiary: #666;
    --accent: var(--cyber-red);
    --success: #00ff88;
    --error: var(--cyber-red);
    --warning: #ffaa00;
    --backdrop: rgba(0, 0, 0, 0.8);
    --background: #0a0a0f;
    --surface: #1a1a24;
    --border-color: var(--cyber-red);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    background: #0f0a0d !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--cyber-darker) 0%, var(--cyber-dark) 50%, #1a0a1a 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(255, 0, 64, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(255, 0, 64, 0.03) 3px
        );
    pointer-events: none;
    z-index: 1;
    animation: scanlines 8s linear infinite;
}

body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--cyber-red-glow) 0%, transparent 70%);
    opacity: 0.1;
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { opacity: 0.1; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.1); }
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    background: linear-gradient(135deg, rgba(20, 10, 15, 0.6) 0%, rgba(10, 5, 10, 0.8) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 48px 36px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(139, 0, 0, 0.2);
    position: relative;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(220, 20, 60, 0.6), rgba(139, 0, 0, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom right, rgba(139, 0, 0, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.card:hover {
    background: linear-gradient(135deg, rgba(30, 15, 20, 0.7) 0%, rgba(15, 8, 12, 0.9) 100%);
    border-color: rgba(220, 20, 60, 0.4);
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(139, 0, 0, 0.3), 0 0 40px rgba(220, 20, 60, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover::before,
.card:hover::after {
    opacity: 1;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #dc143c;
    text-shadow: 0 0 20px rgba(220, 20, 60, 0.5), 0 0 40px rgba(220, 20, 60, 0.3);
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--cyber-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
}

.section:last-child {
    border-bottom: none;
}

.login-section {
    text-align: center;
    padding: 3rem 0;
}

.login-section p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.avatar-section {
    text-align: center;
    margin-bottom: 2rem;
}

.avatar-preview {
    width: 150px;
    height: 150px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: rgba(20, 10, 15, 0.4);
    border: 1px solid rgba(220, 20, 60, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    filter: drop-shadow(0 0 8px rgba(220, 20, 60, 0.3));
}

.avatar-preview:hover {
    transform: scale(1.1);
    border-color: rgba(220, 20, 60, 0.6);
    box-shadow: 0 8px 24px rgba(139, 0, 0, 0.3);
    filter: drop-shadow(0 0 16px rgba(220, 20, 60, 0.6));
}

.avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: bold;
    color: white;
}

.file-input {
    display: none;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--cyber-red);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

input[type="text"],
input[type="email"] {
    width: 100%;
    padding: 1rem;
    background: rgba(26, 26, 36, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--cyber-red) !important;
    border-radius: 0 !important;
    color: var(--cyber-light) !important;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus {
    outline: none;
    border-color: var(--cyber-red) !important;
    box-shadow: 0 0 10px var(--cyber-red-glow), inset 0 0 10px var(--cyber-red-glow) !important;
    background: rgba(26, 26, 36, 1) !important;
}

input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: transparent;
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: 8px;
    color: rgba(220, 20, 60, 0.8);
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btn-primary:hover {
    background: rgba(220, 20, 60, 0.1);
    border-color: rgba(220, 20, 60, 0.6);
    color: #dc143c;
    transform: translateX(2px);
}

.btn-secondary {
    background: transparent;
    color: rgba(220, 20, 60, 0.8);
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: 8px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btn-secondary:hover {
    background: rgba(220, 20, 60, 0.1);
    border-color: rgba(220, 20, 60, 0.6);
    color: #dc143c;
    transform: translateX(2px);
}

.btn-danger {
    background: var(--cyber-red);
    border: 1px solid var(--cyber-red);
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.btn-danger:hover {
    background: rgba(220, 20, 60, 0.8);
    border-color: rgba(220, 20, 60, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 0, 64, 0.4);
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 0;
    border-left: 4px solid;
    margin-bottom: 1.5rem;
    font-weight: 500;
    background: rgba(26, 26, 36, 0.8);
}

.alert-success {
    border-color: var(--success);
    color: var(--success);
}

.alert-error {
    border-color: var(--cyber-red);
    color: var(--cyber-red);
    box-shadow: 0 0 10px var(--cyber-red-glow);
}

.alert-warning {
    border-color: var(--warning);
    color: var(--warning);
}

.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.active {
    display: block;
}

.spinner {
    border: 3px solid var(--glass-border);
    border-top: 3px solid var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--backdrop);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-icon {
    font-size: 2rem;
    line-height: 1;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

.modal-body {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.modal-body p {
    margin: 0;
    padding: 0;
}

.modal-body strong {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body div[style*="background"] {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .card {
        padding: 2rem;
    }

    h1 {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .btn-group {
        flex-direction: column;
    }

    .modal {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
    }
}
