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

html {
    overscroll-behavior-y: contain;
    background: #0a0000;
    min-height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(128, 0, 0, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(128, 0, 0, 0.2) 1px, transparent 1px);
    background-size: 50px 50px;
    background-attachment: fixed;
    z-index: -2;
    animation: moveGrid 15s linear infinite;
}

@keyframes moveGrid {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.purple-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(128, 0, 0, 0.6) 0%, rgba(128, 0, 0, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(60px);
    opacity: 0.7;
    animation: movePurpleGlow 10s infinite alternate;
}

.purple-glow:nth-child(2) {
    left: 70%;
    top: 30%;
    width: 400px;
    height: 400px;
    animation-delay: -5s;
    background: radial-gradient(circle, rgba(249, 147, 147, 0.6) 0%, rgba(249, 147, 172, 0) 70%);
}

.purple-glow:nth-child(3) {
    left: 20%;
    top: 60%;
    width: 350px;
    height: 350px;
    animation-delay: -7s;
    background: radial-gradient(circle, rgba(255, 121, 121, 0.5) 0%, rgba(255, 121, 161, 0) 70%);
}

@keyframes movePurpleGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(150px, 100px); }
}

.auth-container {
    background: #0c0505b5;
    border: 1px solid rgba(246, 92, 92, 0.3);
    border-radius: 20px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.auth-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(45deg, rgba(235, 37, 37, 0.5), rgba(241, 64, 64, 0.3), rgba(240, 112, 112, 0.4));
    border-radius: 20px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite alternate;
}

@keyframes borderGlow {
    0% { opacity: 0.5; }
    100% { opacity: 0.8; }
}

.logo-container {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #a32622 0%, #ef4444 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.logo-text {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(to right, #000000, #e73131, #7d0808, #e73131, #000000);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientFlow 4s ease infinite;
    letter-spacing: 0.5px;
}

@keyframes gradientFlow {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 0%; }
    100% { background-position: 0% 0%; }
}

.auth-subtitle {
    font-size: 1.1rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.auth-welcome {
    font-size: 0.9rem;
    color: #6b7280;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #d1d5db;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(31, 13, 13, 0.6);
    border: 1px solid rgba(246, 92, 92, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(246, 92, 92, 0.8);
    box-shadow: 0 0 0 3px rgba(246, 92, 92, 0.2);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #6b7280;
}

.form-group .input-icon {
    position: absolute;
    right: 1rem;
    top: 68%;
    transform: translateY(-50%);
    color: #a32622;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-group .input-icon:hover {
    color: #ef4444;
}

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.auth-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #a32622 0%, #ef4444 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.auth-footer {
    text-align: center;
    padding: 10px;
    font-size: 18px;
}

.support-link {
    color: #db3434;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.support-link:hover {
    color: #b92929;
    text-decoration: underline;
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 2rem;
        margin: 1rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
}