:root {
    --primary-blue: #47b5ff;
    --primary-blue-dark: #1a91e8;
    --primary-blue-glow: rgba(71, 181, 255, 0.18);
    --dark-bg: #0a0e17;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #b2aeae;
    --error-red: #ff4747;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Montserrat', sans-serif;
}

body {
    background-color: var(--dark-bg);
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(71, 181, 255, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 100% 100%, rgba(26, 145, 232, 0.10) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(10, 14, 23, 1) 0%, rgba(5, 7, 12, 1) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-main);
    overflow-x: hidden;
}

.auth-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 20px 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Background Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.3;
}

.shape-1 {
    width: 350px;
    height: 350px;
    background: var(--primary-blue);
    top: -120px;
    left: -120px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--primary-blue-dark);
    bottom: -150px;
    right: -150px;
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 44px 40px 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(71, 181, 255, 0.05);
    animation: fadeInScale 0.6s ease-out;
    margin-bottom: 40px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Logo */
.logo-section {
    text-align: center;
    margin-bottom: 24px;
    margin-top: -8px;
}

.logo-section img {
    max-width: 190px;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 14px rgba(71, 181, 255, 0.18));
    transition: transform 0.3s ease;
}

.logo-section img:hover {
    transform: scale(1.03);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

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

.form-group label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-weight: 600;
}

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

.input-wrapper i:not(.toggle-password) {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 16px;
}

.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1.5px solid var(--glass-border) !important;
    border-radius: 12px;
    padding: 14px 16px;
    padding-right: 46px; 
    color: var(--text-main) !important;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.auth-input:focus {
    border-color: var(--primary-blue) !important;
    background: rgba(71, 181, 255, 0.04) !important;
    box-shadow: 0 0 0 4px var(--primary-blue-glow);
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 16px;
    left: auto;
    cursor: pointer;
    color: var(--primary-blue);
    font-size: 16px;
    transition: color 0.3s, transform 0.2s;
    z-index: 10;
}

.toggle-password:hover {
    color: var(--text-main);
    transform: scale(1.1);
}

/* Actions Row */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-muted);
    user-select: none;
}

.remember-me input {
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.forgot-link {
    color: var(--primary-blue);
    text-decoration: none;
    transition: opacity 0.3s;
}

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

/* Button */
.auth-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 18px rgba(71, 181, 255, 0.25);
    letter-spacing: 0.3px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(71, 181, 255, 0.38);
    filter: brightness(1.08);
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(71, 181, 255, 0.2);
}

/* Footer Links */
.auth-footer {
    text-align: center;
    margin-top: 28px;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Error/Success Messages */
.message-box {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    display: none;
}

.error-message {
    background: rgba(255, 71, 71, 0.1);
    border: 1px solid var(--error-red);
    color: var(--error-red);
}

.success-message {
    background: rgba(71, 181, 255, 0.08);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

/* Multi-column form (Register) */
.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 32px 20px;
    }
    .auth-container {
        padding: 36px 16px 40px;
    }
    .form-row {
        flex-direction: column;
        gap: 24px;
    }
}

/* Select Styling */
select.auth-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2347b5ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

select.auth-input option {
    background-color: var(--dark-bg);
    color: var(--text-main);
}
