/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html,
body {
    height: 100%;
    overflow: auto;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Background Video */
.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -2;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, rgba(5, 10, 30, 0.85) 0%, rgba(26, 31, 58, 0.9) 100%);
    z-index: -1;
}

/* Loading Animation */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #66aaff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    border-top-color: #347dff;
    animation-delay: -0.3s;
}

.spinner-ring:nth-child(3) {
    width: 40%;
    height: 40%;
    top: 30%;
    left: 30%;
    border-top-color: #1e66e3;
    animation-delay: -0.6s;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #66aaff;
    font-size: 18px;
    font-weight: 500;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Enhanced Login Container */
.login-container {
    position: relative;
    background: rgba(20, 24, 43, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 170, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    color: #fff;
    width: 420px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.8s ease-out;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.login-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

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

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 25px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #347dff 0%, #1e66e3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 32px;
    color: white;
    box-shadow: 0 10px 25px rgba(30, 102, 227, 0.4);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-icon i {
    font-size: 32px;
    color: white;
}

.logo-section h1 {
    font-size: 28px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.tagline {
    color: #66aaff;
    font-size: 15px;
    font-weight: 400;
}

/* Form Container */
.form-container {
    flex: 1;
}

.form-container h2 {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    text-align: center;
}

.subtitle {
    color: #66aaff;
    font-size: 14px;
    text-align: center;
    margin-bottom: 25px;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Input Styling */
.input-group {
    position: relative;
    margin-bottom: 5px;
}

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

.input-icon {
    position: absolute;
    left: 15px;
    color: #66aaff;
    font-size: 16px;
    z-index: 1;
    transition: color 0.3s;
}

.toggle-password {
    position: absolute;
    right: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #66aaff;
}

input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 1px solid rgba(102, 170, 255, 0.2);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background-color: rgba(30, 34, 53, 0.5);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

input:focus {
    border-color: #66aaff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 170, 255, 0.2);
    background-color: rgba(30, 34, 53, 0.7);
}

input:focus + .input-icon {
    color: #347dff;
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #347dff;
    transition: width 0.3s;
}

input:focus ~ .input-focus-border {
    width: 100%;
}

.error-msg {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
    padding-left: 45px;
    display: block;
}

.input-error {
    border: 1px solid #ff6b6b !important;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2) !important;
}

/* Password Strength */
.password-strength {
    display: none;
    margin-top: 8px;
    text-align: left;
    padding-left: 45px;
}

.strength-bar {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: width 0.3s, background-color 0.3s;
}

.strength-text {
    font-size: 12px;
}

/* Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    user-select: none;
    margin: 5px 0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 18px;
    width: 18px;
    background-color: rgba(30, 34, 53, 0.5);
    border: 1px solid rgba(102, 170, 255, 0.3);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(30, 34, 53, 0.7);
    border-color: rgba(102, 170, 255, 0.5);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #347dff;
    border-color: #347dff;
}

.checkmark:after {
    content: "";
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Options Row */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.options-row a {
    color: #66aaff;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.options-row a:hover {
    color: #347dff;
    text-decoration: none;
    transform: translateY(-1px);
}

.terms-link {
    color: #66aaff;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.terms-link:hover {
    color: #347dff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Button Styling */
.signup-btn {
    background: linear-gradient(135deg, #347dff 0%, #1e66e3 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(30, 102, 227, 0.3);
}

.signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(30, 102, 227, 0.4);
    filter: brightness(1.05);
}

.signup-btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(30, 102, 227, 0.4);
}

.signup-btn.loading {
    pointer-events: none;
}

.btn-text {
    font-weight: 600;
    transition: opacity 0.3s;
}

.btn-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.loader-dot {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loader-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Social Login */
.social-login {
    margin-top: 25px;
    text-align: center;
}

.social-login p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 15px;
    position: relative;
}

.social-login p::before,
.social-login p::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.social-login p::before {
    left: 0;
}

.social-login p::after {
    right: 0;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(30, 34, 53, 0.5);
    border: 1px solid rgba(102, 170, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.social-icon:hover {
    transform: translateY(-3px);
    background: rgba(30, 34, 53, 0.8);
    border-color: rgba(102, 170, 255, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.social-icon i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-text {
    margin-top: 25px;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.signup-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.signup-link a {
    color: #66aaff;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: all 0.3s;
}

.signup-link a:hover {
    color: #347dff;
    transform: translateY(-1px);
    display: inline-block;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(20, 24, 43, 0.95);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(150%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
    max-width: 350px;
}

.notification.show {
    transform: translateX(0);
}

.notification i {
    font-size: 20px;
}

.notification.success i {
    color: #4cd964;
}

.notification.error i {
    color: #ff3b30;
}

.notification.info i {
    color: #66aaff;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.notification-message {
    font-size: 13px;
    opacity: 0.9;
}

/* Responsive */
@media screen and (max-width: 480px) {
    .login-container {
        width: 90%;
        padding: 30px 20px;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
    }

    .logo-section h1 {
        font-size: 24px;
    }

    input {
        padding: 12px 15px 12px 40px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }
}