/* Auth Page Styles */
.auth-navbar {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(26, 67, 0, 0.05);
}

.auth-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.auth-logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a4300;
    letter-spacing: -0.5px;
}

.page-title {
    font-size: 1.1rem;
    color: #666;
    font-weight: 500;
}

.auth-nav-right {
    display: flex;
    align-items: center;
}

.language-selector {
    position: relative;
}

.language-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.language-btn:hover {
    border-color: #1a4300;
    background: #f8fdf5;
}

.language-btn i:first-child {
    color: #1a4300;
}

.language-btn i:last-child {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.language-btn.active i:last-child {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.language-option:hover {
    background: #f8fdf5;
    color: #1a4300;
}

.language-option .flag {
    font-size: 1.25rem;
}

/* Auth Container */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: inherit;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.5s ease;
    border: none; /* Removed border */
}

.auth-card-large {
    max-width: 600px;
}

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

.auth-header {
    text-align: left;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: #1a4300;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 0 !important;
}

.form-control:focus {
    outline: none;
    border-color: #1a4300;
    box-shadow: 0 0 0 3px rgba(26, 67, 0, 0.1);
}

.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #1a4300;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.forgot-link {
    color: #1a4300;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.forgot-link:hover {
    opacity: 0.8;
}

.btn-auth-primary {
    background: #1a4300;
    color: #fff;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-auth-primary:hover {
    background: #2d6b00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 67, 0, 0.3);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 1rem;
}

.btn-social-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.btn-social-login:hover {
    border-color: #1a4300;
    background: #f8fdf5;
}

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

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #1a4300;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.auth-footer a:hover {
    opacity: 0.8;
}

/* Password Requirements */
.password-requirements {
    background: #f8fdf5;
    border: 1px solid #e8f5e0;
    border-radius: 8px;
    padding: 1rem;
}

.requirements-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement i {
    font-size: 0.5rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.requirement.valid i {
    color: #1a4300;
}

.requirement.valid span {
    color: #1a4300;
    font-weight: 500;
}

/* OTP Input */
.otp-input-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.otp-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #1a4300;
    box-shadow: 0 0 0 3px rgba(26, 67, 0, 0.1);
}

.resend-section {
    text-align: center;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.resend-section a {
    color: #1a4300;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.resend-section a:hover {
    opacity: 0.8;
}

/* Two Factor Input */
.two-factor-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    padding: 1rem;
}

/* Crypto trading theme styles */
body {
    font-family: "Inter", sans-serif;
}

.crypto-card {
    position: relative;
    overflow: hidden;
}

.crypto-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    /*background: linear-gradient(90deg, #1a4300 0%, #2d6b00 100%);*/
}

/* Login method tabs */
.login-method-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    background: #f5f5f521;
    padding: 0.25rem;
    border-radius: 10px;
}

.method-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-tab:hover {
    color: #1a4300;
}

.method-tab.active {
    position: relative;
    color: #1a4300;
}

.method-tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 25%; /* pushes the line inward from the left */
    width: 50%; /* half the width of the element */
    height: 3px;
    background-color: darkslategrey;
    border-radius: 2px;
}

.method-tab i {
    font-size: 1rem;
}

/* Login sections toggle */
.login-section {
    display: none;
}

.login-section.active {
    display: block;
}

/* Phone input with country code */
.phone-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.country-code-select {
    width: 100px;
    padding: 0.75rem 0.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-code-select:focus {
    outline: none;
    border-color: #1a4300;
    box-shadow: 0 0 0 3px rgba(26, 67, 0, 0.1);
}

.phone-input {
    flex: 1;
}

/* Crypto-themed input styles */
.crypto-input {
    border-bottom: 2px solid #e0e0e0 !important;
    transition: all 0.3s ease;
}

.crypto-input:focus {
    background: #fff;
    border-color: #1a4300;
    box-shadow: 0 0 0 3px rgba(26, 67, 0, 0.08);
}

.crypto-input.error {
    border-color: #dc3545;
    background: #fff5f5;
}

.crypto-input.error:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Error message styles */
.error-message {
    background: #fff5f5;
    border: 1px solid #ffcdd2;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #c62828;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message i {
    font-size: 1.1rem;
}

.input-error {
    display: block;
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.375rem;
    min-height: 1rem;
}

/* Crypto-themed button */
.crypto-btn {
    position: relative;
    background: linear-gradient(135deg, #1a4300 0%, #2d6b00 100%);
    overflow: hidden;
}

.crypto-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.crypto-btn:hover::before {
    left: 100%;
}

.crypto-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.crypto-btn:disabled:hover {
    box-shadow: none;
}

.btn-loader {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Social login grid */
.social-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.crypto-social {
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

.crypto-social:hover {
    background: #fff;
    border-color: #1a4300;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(26, 67, 0, 0.1);
}

.crypto-checkbox {
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}

.crypto-checkbox:checked {
    background-color: #1a4300;
    border-color: #1a4300;
}

/* Dark mode toggle button styles */
.dark-mode-toggle {
    position: fixed;
    top: 100px;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dark-mode-toggle:hover {
    background: #1a4300;
    border-color: #1a4300;
    transform: scale(1.1);
}

.dark-mode-toggle:hover i {
    color: #fff;
}

.dark-mode-toggle i {
    font-size: 1.25rem;
    color: #1a4300;
    transition: color 0.3s ease;
}

/* Dark mode styles */
body.dark-mode {
    background: linear-gradient(135deg, #0d0e0c 0%, #141514 100%);
}

body.dark-mode .auth-container {
    background: transparent;
}

body.dark-mode .auth-card {
    background: inherit;
}

body.dark-mode .auth-header h2,
body.dark-mode .auth-header p,
body.dark-mode .form-group label,
body.dark-mode .form-options label,
body.dark-mode .auth-footer,
body.dark-mode .divider,
body.dark-mode .form-text,
body.dark-mode .form-check-label {
    color: #fff;
}

.form-text,
.form-check-label {
    color: #000;
}

body.dark-mode .crypto-input,
body.dark-mode .country-code-select {
    background: rgb(255 255 255 / 0%);
    border-color: rgb(255 255 255 / 7%);
    color: #fff;
}

body.dark-mode .crypto-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .crypto-input:focus,
body.dark-mode .country-code-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4ade80;
}

body.dark-mode .method-tab {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .method-tab.active {
    background: inherit;
    color: #fff;
    border-bottom: 4px solid black;
    box-shadow: 0 2px 2px rgb(98 132 77 / 48%);
}

body.dark-mode .login-method-tabs {
    background: inherit;
}

body.dark-mode .password-toggle {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .forgot-link,
body.dark-mode .auth-footer a {
    color: #4ade80;
}

body.dark-mode .btn-social-login {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

body.dark-mode .btn-social-login:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4ade80;
}

body.dark-mode .dark-mode-toggle {
    background: rgba(26, 67, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .dark-mode-toggle i {
    color: #fff;
}

body.dark-mode .dark-mode-toggle:hover {
    background: #4ade80;
    border-color: #4ade80;
}

/* Multi-step registration styles */
.register-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #1a4300 0%, #2d6b00 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 67, 0, 0.3);
}

.progress-step.completed .step-circle {
    background: #1a4300;
    color: #fff;
}

.progress-step.completed .step-circle::after {
    content: "✓";
    position: absolute;
}

.step-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
    transition: color 0.3s ease;
}

.progress-step.active .step-label {
    color: #1a4300;
    font-weight: 600;
}

.progress-line {
    width: 60px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 0.5rem;
    position: relative;
    top: -12px;
}

.progress-step.completed ~ .progress-line {
    background: #1a4300;
}

/* Register step visibility */
.register-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.register-step.active {
    display: block;
}

/* Step buttons */
.step-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.step-buttons button {
    flex: 1;
}

.btn-auth-secondary {
    background: transparent;
    color: #1a4300;
    border: 2px solid #1a4300;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-auth-secondary:hover {
    background: #1a4300;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 67, 0, 0.3);
}

.helper-text {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

/* Dark mode adjustments for multi-step */
body.dark-mode .step-circle {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .progress-step.active .step-circle {
    background: linear-gradient(135deg, #2d6b00 0%, #4ade80 100%);
    color: #fff;
}

body.dark-mode .progress-step.completed .step-circle {
    background: #4ade80;
    color: #000;
}

body.dark-mode .step-label {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .progress-step.active .step-label {
    color: #4ade80;
}

body.dark-mode .progress-line {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .progress-step.completed ~ .progress-line {
    background: #4ade80;
}

body.dark-mode .btn-auth-secondary {
    border-color: #4ade80;
    color: #4ade80;
}

body.dark-mode .btn-auth-secondary:hover {
    background: #4ade80;
    color: #000;
}

body.dark-mode .helper-text {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .password-requirements {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .requirements-title {
    color: #fff;
}

body.dark-mode .requirement {
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .requirement.valid {
    color: #4ade80;
}

body.dark-mode .requirement.valid i {
    color: #4ade80;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-nav-container {
        padding: 0 1rem;
    }

    .auth-nav-left {
        gap: 1rem;
    }

    .page-title {
        font-size: 0.9rem;
    }

    .auth-container {
        padding: 0;
    }

    .auth-card {
        padding: 1rem;
    }

    .auth-card-large {
        max-width: 100%;
    }

    .otp-input {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .otp-input-group {
        gap: 0.5rem;
    }

    .register-progress {
        padding: 1rem 0;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .progress-line {
        width: 40px;
        top: -10px;
    }

    .step-buttons {
        flex-direction: column;
    }

    .step-buttons button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.25rem;
    }

    .page-title {
        display: none;
    }

    .language-btn span {
        display: none;
    }

    .otp-input {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .social-login-grid {
        grid-template-columns: 1fr;
    }

    .method-tab span {
        display: none;
    }

    .country-code-select {
        width: 80px;
        font-size: 0.85rem;
    }

    .step-label {
        display: none;
    }

    .progress-line {
        width: 30px;
    }
}
