* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

:root {
    --bgColor: #080B14;
    --primaryPurple: #6440b8;
    --primaryPurpleLight: #7c5cff;
    --primaryPurpleDark: #6d48c5;
    --primaryPurpleLightExtra: #8a6cff;
    --textWhite: #ffffff;
    --textGray: #a5a1a1;
    --textGrayLight: #c0c0c0;
    --darkBg: #080808;
    --darkPurpleBg: #230b5a;
    --borderGray: #1a1a1a;
    --lightBorder: #2a2a2a;
    --successGreen: #2ecc71;
    --errorRed: #ff4757;
    --shadowColor: rgba(0, 0, 0, 0.4);
    --inputBg: rgba(255, 255, 255, 0.03);
}

html,
body {
    background: var(--bgColor);
    color: var(--textWhite);
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--textWhite);
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    padding: 20px;
    margin: 0 auto;
}

.auth-card {
    background: var(--darkBg);
    border: 1px solid var(--borderGray);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
    max-height: 95vh;
    overflow-y: auto;
}

.auth-card::-webkit-scrollbar {
    width: 4px;
}

.auth-card::-webkit-scrollbar-track {
    background: transparent;
}

.auth-card::-webkit-scrollbar-thumb {
    background: var(--primaryPurple);
    border-radius: 10px;
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--borderGray);
    gap: 16px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.auth-logo img {
    height: 44px;
    width: auto;
    display: block;
}

.auth-logo span {
    font-size: 18px;
    font-weight: 700;
    color: var(--textWhite);
    letter-spacing: -0.5px;
}

.auth-redirect {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--textGray);
    flex-wrap: wrap;
}

.auth-redirect a {
    color: var(--primaryPurple);
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-redirect a:hover {
    color: var(--primaryPurpleLight);
    text-decoration: underline;
}

.auth-welcome {
    padding: 28px 28px 8px 28px;
    flex-shrink: 0;
}

.auth-welcome h1 {
    font-size: 30px;
    font-weight: 800;
    color: var(--textWhite);
    line-height: 1.2;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.auth-welcome p {
    font-size: 15px;
    color: var(--textGray);
    line-height: 1.5;
}

.auth-form {
    padding: 20px 28px 12px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--textGray);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--inputBg);
    border: 1px solid var(--borderGray);
    border-radius: 12px;
    transition: all 0.3s ease;
    width: 100%;
}

.input-wrapper:focus-within {
    border-color: var(--primaryPurple);
    box-shadow: 0 0 0 3px rgba(100, 64, 184, 0.15);
}

.input-wrapper:hover {
    border-color: var(--lightBorder);
}

.input-wrapper>i:first-child {
    position: absolute;
    left: 14px;
    color: var(--textGray);
    font-size: 18px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-wrapper:focus-within>i:first-child {
    color: var(--primaryPurpleLight);
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 48px 14px 44px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--textWhite);
    font-size: 15px;
    font-family: "Poppins", sans-serif;
    transition: all 0.3s ease;
    outline: none;
    min-height: 52px;
}

.input-wrapper input::placeholder {
    color: var(--textGray);
    font-size: 14px;
    opacity: 0.7;
}

.input-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    padding-right: 48px;
    color: var(--textWhite);
}

.input-wrapper select option {
    background: var(--darkBg);
    color: var(--textWhite);
    padding: 10px;
}

.input-wrapper select:invalid {
    color: var(--textGray);
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--textGray);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    z-index: 2;
    width: 40px;
    height: 40px;
}

.toggle-password:hover {
    color: var(--primaryPurpleLight);
    background: rgba(100, 64, 184, 0.1);
}

.toggle-password i {
    font-size: 20px;
    pointer-events: none;
}

.select-arrow {
    position: absolute;
    right: 14px;
    color: var(--textGray);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--borderGray);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    position: relative;
}

.remember-me input[type="checkbox"]:hover {
    border-color: var(--primaryPurple);
}

.remember-me input[type="checkbox"]:checked {
    background: var(--primaryPurple);
    border-color: var(--primaryPurple);
}

.remember-me input[type="checkbox"]:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--textWhite);
    font-size: 12px;
    font-weight: bold;
}

.remember-me label {
    font-size: 14px;
    color: var(--textGray);
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: var(--primaryPurple);
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    color: var(--primaryPurpleLight);
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primaryPurple), var(--primaryPurpleLight));
    color: var(--textWhite);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    min-height: 56px;
    box-shadow: 0 4px 16px rgba(100, 64, 184, 0.3);
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(100, 64, 184, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(0px) scale(0.98);
}

.auth-submit-btn .btn-text {
    transition: all 0.3s ease;
}

.auth-submit-btn i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.auth-submit-btn:hover i {
    transform: translateX(3px);
}

.auth-error {
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid var(--errorRed);
    border-radius: 10px;
    padding: 14px 18px;
    color: #ff6b7a;
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.auth-footer {
    padding: 16px 28px 24px 28px;
    border-top: 1px solid var(--borderGray);
    background: var(--darkPurpleBg);
    flex-shrink: 0;
}

.auth-footer p {
    font-size: 12px;
    color: var(--textGray);
    text-align: center;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 16px;
        max-width: 100%;
    }

    .auth-card {
        border-radius: 16px;
        max-height: 98vh;
    }

    .auth-header {
        padding: 20px 24px;
    }

    .auth-welcome {
        padding: 24px 24px 4px 24px;
    }

    .auth-welcome h1 {
        font-size: 26px;
    }

    .auth-form {
        padding: 16px 24px 8px 24px;
        gap: 14px;
    }

    .auth-footer {
        padding: 14px 24px 20px 24px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
    }

    .auth-card {
        border-radius: 14px;
        max-height: 100vh;
    }

    .auth-header {
        padding: 16px 18px;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .auth-logo {
        justify-content: center;
    }

    .auth-logo img {
        height: 38px;
    }

    .auth-logo span {
        font-size: 16px;
    }

    .auth-redirect {
        justify-content: center;
        font-size: 12px;
    }

    .auth-welcome {
        padding: 18px 18px 0px 18px;
        text-align: center;
    }

    .auth-welcome h1 {
        font-size: 24px;
    }

    .auth-welcome p {
        font-size: 14px;
    }

    .auth-form {
        padding: 14px 18px 6px 18px;
        gap: 14px;
    }

    .form-group label {
        font-size: 12px;
    }

    .input-wrapper {
        border-radius: 10px;
    }

    .input-wrapper input,
    .input-wrapper select {
        padding: 12px 44px 12px 38px;
        font-size: 14px;
        min-height: 46px;
    }

    .input-wrapper>i:first-child {
        font-size: 16px;
        left: 12px;
    }

    .toggle-password {
        right: 4px;
        width: 36px;
        height: 36px;
    }

    .toggle-password i {
        font-size: 18px;
    }

    .select-arrow {
        right: 12px;
        font-size: 12px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .remember-me label {
        font-size: 13px;
    }

    .forgot-link {
        font-size: 13px;
    }

    .auth-submit-btn {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 48px;
    }

    .auth-submit-btn i {
        font-size: 18px;
    }

    .auth-footer {
        padding: 12px 18px 16px 18px;
    }

    .auth-footer p {
        font-size: 11px;
    }

    .auth-error {
        font-size: 13px;
        padding: 12px 14px;
    }

    .auth-loading {
        font-size: 13px;
        padding: 12px;
    }

    .auth-loading .spinner {
        width: 20px;
        height: 20px;
    }

    .checkbox-wrapper label {
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .auth-container {
        padding: 6px;
    }

    .auth-card {
        border-radius: 12px;
    }

    .auth-header {
        padding: 12px 14px;
    }

    .auth-logo img {
        height: 32px;
    }

    .auth-logo span {
        font-size: 14px;
    }

    .auth-welcome {
        padding: 14px 14px 0px 14px;
    }

    .auth-welcome h1 {
        font-size: 20px;
    }

    .auth-welcome p {
        font-size: 13px;
    }

    .auth-form {
        padding: 12px 14px 4px 14px;
        gap: 12px;
    }

    .input-wrapper input,
    .input-wrapper select {
        padding: 10px 38px 10px 34px;
        font-size: 13px;
        min-height: 42px;
    }

    .input-wrapper>i:first-child {
        font-size: 14px;
        left: 10px;
    }

    .toggle-password {
        right: 2px;
        width: 32px;
        height: 32px;
    }

    .toggle-password i {
        font-size: 16px;
    }

    .auth-submit-btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }

    .auth-submit-btn i {
        font-size: 16px;
    }

    .auth-footer {
        padding: 10px 14px 14px 14px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.5s ease-out;
}