
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(1deg); }
}

.auth-container {
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 20px;
    padding: 40px;
    width: 450px;
    max-width: 90vw;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.auth-card::after {
    display: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    z-index: 2;
}

.logo-container img {
    max-width: 80px;
    max-height: 80px;
    width: auto;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(255, 215, 0, 0.3));
    transition: all 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(255, 215, 0, 0.4));
}

.form-container {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.form-container.hidden {
    opacity: 0;
    transform: translateY(20px);
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    pointer-events: none;
}

.form-title {
    color: #f8fafc;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #ffd700, #daa520, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.input-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
    flex: 1;
}

.input-group label {
    display: block;
    color: #daa520;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.input-group input {
    width: 100%;
    height: 48px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: #f8fafc;
    font-size: 16px;
    padding: 0 16px;
    transition: all 0.2s ease;
    outline: none;
}

.input-group input::placeholder {
    color: #64748b;
}

.input-group input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
    background: rgba(15, 23, 42, 0.95);
}

.input-group input:hover:not(:focus) {
    border-color: rgba(148, 163, 184, 0.3);
}

.submit-btn {
    width: 100%;
    height: 52px;
    background: linear-gradient(135deg, #ffd700 0%, #daa520 50%, #b8860b 100%);
    border: none;
    border-radius: 14px;
    color: #1a1a0f;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 28px 0;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #ffed4e 0%, #f7d940 50%, #daa520 100%);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 15px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.form-footer {
    text-align: center;
    color: rgba(218, 165, 32, 0.8);
    font-size: 14px;
}

.switch-form {
    background: none;
    border: none;
    color: #ffd700;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.switch-form:hover {
    color: #ffed4e;
    text-shadow: 0 1px 4px rgba(255, 215, 0, 0.4);
}

.settings-icon {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, rgba(26, 26, 15, 0.9), rgba(45, 36, 22, 0.8));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #daa520;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.settings-icon:hover {
    background: linear-gradient(145deg, rgba(45, 36, 22, 0.95), rgba(26, 26, 15, 0.9));
    color: #ffd700;
    transform: rotate(45deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.2);
}

.message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 18px 24px;
    border-radius: 14px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 320px;
    backdrop-filter: blur(15px);
    animation: slideIn 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.message-container.hidden {
    display: none;
}

.message-container.error {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.95), rgba(185, 28, 28, 0.9));
    border: 1px solid rgba(220, 38, 38, 0.4);
}

.message-container.success {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(218, 165, 32, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #1a1a0f;
}

.message-container button {
    background: none;
    border: none;
    color: inherit;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 16px;
    padding: 4px;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.message-container button:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 520px) {
    .auth-card {
        padding: 35px 25px;
        width: 95vw;
        border-radius: 20px;
    }
    
    .form-container.hidden {
        left: 25px;
        right: 25px;
        top: 35px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-title {
        font-size: 28px;
        margin-bottom: 20px;
    }
    
    .logo-container {
        margin-bottom: 20px;
    }
    
    .logo-container img {
        max-width: 65px;
        max-height: 65px;
    }
    
    .settings-icon {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
    
    .message-container {
        top: 15px;
        right: 15px;
        left: 15px;
        min-width: auto;
    }
}