/* Auth Pages Styles */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 1200px;
    min-height: 700px;
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    box-shadow: 
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        0 30px 60px -30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

/* Branding Section */
.auth-branding {
    background: linear-gradient(135deg, 
        rgba(147, 51, 234, 0.3) 0%,
        rgba(79, 70, 229, 0.2) 50%,
        rgba(236, 72, 153, 0.3) 100%);
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, transparent 70%);
    animation: morphFloat 20s ease-in-out infinite;
}

.brand-content {
    position: relative;
    z-index: 1;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 40px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: sparkle 2s ease-in-out infinite;
}

.logo-text {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-family: 'Syne', sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.brand-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 400px;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
}

.feature-icon {
    font-size: 24px;
}

.feature-item span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Stats Section */
.brand-stats {
    display: flex;
    gap: 32px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Syne', sans-serif;
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Section */
.auth-form-section {
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.auth-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
}

/* Alert Messages */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    animation: fadeInUp 0.3s ease-out;
}

.auth-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.auth-alert.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #86efac;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    padding-left: 4px;
}

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

.input-wrapper svg {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.4);
    transition: stroke 0.3s ease;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-wrapper input:focus {
    outline: none;
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.input-wrapper input:focus + svg,
.input-wrapper:focus-within svg:first-child {
    stroke: #a855f7;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password svg {
    position: static;
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.4);
    transition: stroke 0.3s ease;
}

.toggle-password:hover svg {
    stroke: rgba(255, 255, 255, 0.8);
}

/* Password Strength */
.password-strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    min-width: 80px;
    text-align: right;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.checkbox-wrapper input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input:checked + .checkmark {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    border-color: transparent;
}

.checkbox-wrapper input:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.forgot-link {
    font-size: 14px;
    color: #a855f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #c084fc;
}

/* Agreements Section */
.agreements-section {
    margin-top: 8px;
}

.agreements-checkbox {
    align-items: flex-start;
}

.agreement-text {
    line-height: 1.6;
}

.agreement-text a {
    color: #a855f7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.agreement-text a:hover {
    color: #c084fc;
    text-decoration: underline;
}

/* Auth Button */
.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(168, 85, 247, 0.5);
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px -8px rgba(168, 85, 247, 0.6);
}

.auth-btn.primary:active {
    transform: translateY(0);
}

.auth-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.auth-btn svg {
    width: 20px;
    height: 20px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Login */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
}

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

.auth-footer a:hover {
    color: #c084fc;
}

/* Legal Modals */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.legal-modal.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-content {
    background: rgba(25, 25, 40, 0.95);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 32px 64px -16px rgba(0, 0, 0, 0.5);
}

.legal-modal.active .legal-modal-content {
    transform: scale(1) translateY(0);
}

.legal-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-modal-header h3 {
    font-family: 'Syne', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: rgba(255, 255, 255, 0.6);
}

.legal-modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.legal-modal-body h4 {
    font-family: 'Syne', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 24px 0 12px;
}

.legal-modal-body h4:first-child {
    margin-top: 0;
}

.legal-modal-body h5 {
    font-size: 16px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 16px 0 8px;
}

.legal-modal-body p {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
}

.legal-modal-body ul {
    margin: 12px 0;
    padding-left: 24px;
}

.legal-modal-body li {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.legal-modal-body li strong {
    color: rgba(255, 255, 255, 0.9);
}

.legal-modal-footer {
    padding: 20px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
        min-height: auto;
    }

    .auth-branding {
        padding: 40px;
    }

    .brand-tagline {
        font-size: 36px;
    }

    .brand-features {
        display: none;
    }

    .brand-stats {
        justify-content: center;
    }

    .auth-form-section {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-container {
        border-radius: 24px;
    }

    .auth-branding {
        padding: 32px 24px;
    }

    .brand-logo {
        margin-bottom: 24px;
        justify-content: center;
    }

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

    .logo-text {
        font-size: 26px;
    }

    .brand-tagline {
        font-size: 28px;
        text-align: center;
    }

    .brand-description {
        text-align: center;
        font-size: 14px;
        margin-bottom: 24px;
    }

    .brand-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 28px;
    }

    .stat-label {
        font-size: 12px;
    }

    .auth-form-section {
        padding: 32px 24px;
    }

    .auth-header h2 {
        font-size: 26px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .input-wrapper input {
        padding: 14px 14px 14px 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .auth-btn {
        padding: 14px 24px;
        font-size: 15px;
    }

    .legal-modal {
        padding: 12px;
    }

    .legal-modal-content {
        max-height: 90vh;
        border-radius: 20px;
    }

    .legal-modal-header {
        padding: 20px 24px;
    }

    .legal-modal-header h3 {
        font-size: 18px;
    }

    .legal-modal-body {
        padding: 24px;
    }

    .legal-modal-body h4 {
        font-size: 16px;
    }

    .legal-modal-body p,
    .legal-modal-body li {
        font-size: 14px;
    }

    .legal-modal-footer {
        padding: 16px 24px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 12px;
        padding-top: 24px;
    }

    .auth-container {
        border-radius: 20px;
    }

    .auth-branding {
        padding: 24px 20px;
    }

    .brand-logo {
        margin-bottom: 20px;
    }

    .logo-icon {
        font-size: 28px;
    }

    .logo-text {
        font-size: 22px;
    }

    .brand-tagline {
        font-size: 24px;
    }

    .brand-description {
        font-size: 13px;
    }

    .brand-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 24px;
    }

    .auth-form-section {
        padding: 24px 20px;
    }

    .auth-header {
        margin-bottom: 24px;
    }

    .auth-header h2 {
        font-size: 22px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .auth-form {
        gap: 16px;
    }

    .form-group label {
        font-size: 13px;
    }

    .input-wrapper input {
        padding: 12px 12px 12px 40px;
    }

    .input-wrapper svg {
        left: 12px;
        width: 18px;
        height: 18px;
    }

    .checkbox-wrapper {
        font-size: 13px;
    }

    .checkmark {
        width: 18px;
        height: 18px;
    }

    .agreement-text {
        font-size: 13px;
        line-height: 1.5;
    }

    .auth-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .auth-divider {
        margin: 20px 0;
    }

    .social-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .auth-footer {
        margin-top: 20px;
    }

    .auth-footer p {
        font-size: 13px;
    }

    .legal-modal-content {
        border-radius: 16px;
    }

    .legal-modal-header {
        padding: 16px 20px;
    }

    .legal-modal-header h3 {
        font-size: 16px;
    }

    .modal-close {
        width: 36px;
        height: 36px;
    }

    .legal-modal-body {
        padding: 20px;
    }

    .legal-modal-body h4 {
        font-size: 15px;
        margin: 20px 0 10px;
    }

    .legal-modal-body h5 {
        font-size: 14px;
    }

    .legal-modal-body p,
    .legal-modal-body li {
        font-size: 13px;
        line-height: 1.7;
    }

    .legal-modal-footer {
        padding: 12px 20px;
    }
}

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

@keyframes sparkle {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.8));
    }
}

@keyframes morphFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Custom Scrollbar for Modal */
.legal-modal-body::-webkit-scrollbar {
    width: 6px;
}

.legal-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(168, 85, 247, 0.3);
    border-radius: 3px;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.5);
}
