/* Variables */
:root {
    --background: #000000;
    --border: #1a1a1a;
    --white: white;
    --grey: #333;
    --lightgrey: #555;
    --darkgrey: #222;
    --yellow: #ffcc00;
    --gold: linear-gradient(135deg, #b8860b, #ffcc00, #b8860b);
    --gold-static: #b8860b;
    --shadow: rgba(0, 0, 0, 0.5);
    --text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', Arial, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 16px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--background);
    border-radius: 10px;
    border: 3px solid var(--border);
}

::-webkit-scrollbar-thumb:hover {
    background-color: #3399ff;
}

/* Links */
a {
    color: var(--yellow);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: #ffd633;
}

a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--yellow);
    transition: width 0.3s ease;
}

a:hover:after {
    width: 100%;
}

/* Layout & Background */
.page-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
}

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: -1;
}

.content-container {
    width: 100%;
    max-width: 480px;
    z-index: 1;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-out;
}

/* Authentication Container */
.auth-container {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 15px 35px var(--shadow), 
                0 3px 10px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 204, 0, 0.05);
    padding: 2.8rem;
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
    position: relative;
    transition: box-shadow 0.4s ease;
}

.auth-container:hover {
    box-shadow: 0 20px 40px var(--shadow), 
                0 5px 15px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 204, 0, 0.1);
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px dashed rgba(255, 204, 0, 0.1);
    border-radius: 8px;
    pointer-events: none;
}

/* Logo Styles */
.header-logo {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-logo img {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 3px solid transparent;
    padding: 5px;
    background: var(--darkgrey);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-image: linear-gradient(var(--darkgrey), var(--darkgrey)), var(--gold);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.footer-logo img:hover {
    transform: scale(1.08) rotate(15deg);
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.auth-tabs::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.2), transparent);
}

.tab-btn {
    flex: 1;
    background: transparent;
    color: var(--lightgrey);
    border: none;
    padding: 1rem 0;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.tab-btn:hover {
    color: var(--yellow);
}

.tab-btn:hover:after {
    width: 40%;
}

.tab-btn.active {
    color: var(--yellow);
    position: relative;
}

.tab-btn.active:after {
    width: 70%;
}

.tab-btn.active:before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--gold-static);
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

/* Tab Content */
.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Form Elements */
.auth-form {
    margin-top: 1.8rem;
}

h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--yellow);
    font-size: 1.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: var(--text-shadow);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::before, h2::after {
    content: '•';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    color: var(--gold-static);
    opacity: 0.7;
}

h2::before {
    left: -1.5rem;
}

h2::after {
    right: -1.5rem;
}

.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

label {
    display: block;
    margin-bottom: 0.7rem;
    font-size: 0.95rem;
    color: #ccc;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Target the remember-me label specifically */
label[for="remember-me"] {
    margin-bottom: 0px;
}

.form-group:focus-within label {
    color: var(--yellow);
}

/* Input with Icon */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    color: var(--lightgrey);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-with-icon i.fa-eye, 
.input-with-icon i.fa-eye-slash {
    left: auto;
    right: 0px;
    top:-8px;
    color: var(--lightgrey);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.input-with-icon i.fa-eye:hover, 
.input-with-icon i.fa-eye-slash:hover {
    color: var(--yellow);
    background-color: rgba(255, 255, 255, 0.05);
}

.input-with-icon input:focus ~ i.fa-eye,
.input-with-icon input:focus ~ i.fa-eye-slash {
    color: var(--yellow);
}

.input-with-icon input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    background-color: var(--darkgrey);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
    caret-color: var(--yellow);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.15);
    background-color: rgba(45, 45, 45, 0.7);
}

.input-with-icon input:focus + i {
    color: var(--yellow);
    transform: scale(1.1);
}

.input-with-icon:focus-within::after {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--lightgrey);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
}

.toggle-password:hover {
    color: var(--yellow);
}

/* Password Strength Meter */
.password-strength {
    margin-top: 0.7rem;
    transition: all 0.3s ease;
}

.strength-meter {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.meter-section {
    height: 100%;
    flex: 1;
    background-color: var(--border);
    border-radius: 2px;
    transition: background-color 0.5s ease, transform 0.3s ease;
}

.meter-section.active {
    transform: scaleY(1.2);
}

.strength-text {
    font-size: 0.85rem;
    color: var(--lightgrey);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.strength-text::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: var(--border);
    transition: background-color 0.3s ease;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    position: relative;
    appearance: none;
    width: 20px;
    height: 20px;
    background-color: var(--darkgrey);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.remember-me input[type="checkbox"]:hover {
    border-color: rgba(255, 204, 0, 0.5);
}

.remember-me input[type="checkbox"]:checked {
    background: var(--gold);
    border-color: var(--gold-static);
}

.remember-me input[type="checkbox"]:checked:after {
    content: '\f00c';
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: 900;
    position: absolute;
    top: 1px;
    left: 3px;
    color: var(--background);
    font-size: 0.85rem;
}

.forgot-password {
    font-size: 0.9rem;
    font-weight: 500;
}

.back-to-login {
    margin-top: 20px;
    display: inline-block; /* Only take up the width of the content */
    clear: both; /* Prevent float issues */
    position: relative; /* Ensure proper positioning */
    font-size: 0.9rem;
    font-weight: 500;
}

/* Buttons */
.btn-auth {
    width: 100%;
    padding: 15px;
    background: var(--gold);
    color: var(--background);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    margin-top: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2), 
                0 0 0 1px rgba(255, 204, 0, 0.1),
                inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-auth:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 
                0 0 0 1px rgba(255, 204, 0, 0.3),
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.btn-auth:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 2.5rem 0;
    overflow: hidden;
}

.auth-divider span {
    display: inline-block;
    position: relative;
    color: var(--lightgrey);
    padding: 0 15px;
    font-size: 0.95rem;
    background-color: rgba(10, 10, 10, 0.85);
    z-index: 1;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), var(--border), transparent);
}

/* Social Auth Buttons */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background-color: rgba(25, 25, 25, 0.5);
    color: var(--white);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-social:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-social:active {
    transform: translateY(0);
}

.btn-social.google {
    border-color: rgba(234, 67, 53, 0.5);
}

.btn-social.facebook {
    border-color: rgba(66, 103, 178, 0.5);
}

.btn-social i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-social:hover i {
    transform: scale(1.1);
}

.btn-social.google i {
    color: #EA4335;
}

.btn-social.facebook i {
    color: #4267B2;
}

/* Terms Agreement */
.terms-agreement {
    margin-bottom: 1.8rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.terms-agreement input[type="checkbox"] {
    margin-top: 3px;
}

.terms-agreement label {
    margin-bottom: 0;
    text-transform: none;
    font-weight: normal;
    letter-spacing: 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media screen and (max-width: 576px) {
    .page-container {
        padding: 1.2rem;
    }
    
    .auth-container {
        padding: 1.8rem;
        margin: 0 15px;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h2::before, h2::after {
        display: none;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .forgot-password {
        align-self: flex-end;
    }
    
    .btn-auth {
        padding: 12px;
    }
}

@media screen and (min-width: 577px) and (max-width: 768px) {
    .auth-container {
        max-width: 90%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}