/* ============================================
   3D STUDIO - AUTH PAGES
   ============================================ */

/* ===== Variables ===== */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --secondary: #FD79A8;
    --accent: #00CEC9;
    --gradient-1: linear-gradient(135deg, #6C5CE7, #FD79A8);
    --gradient-2: linear-gradient(135deg, #6C5CE7, #00CEC9);

    --dark: #0a0a1a;
    --dark-card: rgba(18, 18, 42, 0.95);
    --dark-light: #1a1a3e;
    --text-light: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.4);

    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.2);
    --shadow-glow-strong: 0 0 80px rgba(108, 92, 231, 0.3);

    --radius: 20px;
    --radius-sm: 12px;
}

/* ===== Base ===== */
body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: white;
    min-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* ===== Particles ===== */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ===== Auth Container ===== */
.auth-container {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-wrapper {
    display: flex;
    width: 100%;
    max-width: 1100px;
    min-height: 600px;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: var(--gradient-1);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ===== Auth Card ===== */
.auth-card {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 24px;
    transition: transform 0.3s ease;
}

.auth-logo:hover {
    transform: scale(1.02);
}

.auth-logo span {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.auth-logo span span {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

/* ===== Auth Form ===== */
.auth-form {
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-group .input-group {
    position: relative;
}

.form-group .input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 4;
    transition: all 0.3s ease;
}

.form-control {
    width: 100%;
    padding: 12px 16px 12px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.form-control:focus + .input-icon,
.form-control:focus ~ .input-icon {
    color: var(--primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: #FF4757;
    background: rgba(255, 71, 87, 0.05);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(255, 71, 87, 0.1);
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 4;
}

.password-toggle:hover {
    color: white;
}

/* ===== Auth Options ===== */
.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: white;
}

/* ===== Buttons ===== */
.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-auth::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-auth:hover::before {
    opacity: 1;
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth span,
.btn-auth i {
    position: relative;
    z-index: 1;
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* Social buttons */
.social-auth {
    margin-top: 24px;
    text-align: center;
}

.social-auth p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
    position: relative;
}

.social-auth p::before,
.social-auth p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 30%;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
}

.social-auth p::before {
    left: 0;
}

.social-auth p::after {
    right: 0;
}

.social-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-social {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-light);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 160px;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.btn-social i {
    font-size: 1.2rem;
}

.btn-social.google:hover {
    border-color: #EA4335;
    box-shadow: 0 0 20px rgba(234, 67, 53, 0.15);
}

.btn-social.github:hover {
    border-color: #6e7681;
    box-shadow: 0 0 20px rgba(110, 118, 129, 0.15);
}

/* ===== Auth Footer ===== */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: white;
}

/* ===== Error Messages ===== */
.invalid-feedback {
    display: block;
    color: #FF4757;
    font-size: 0.8rem;
    margin-top: 4px;
}

.alert-danger {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.2);
    color: #FF4757;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.alert-danger i {
    margin-right: 8px;
}

/* ===== Decoration Side ===== */
.auth-decoration {
    flex: 0.8;
    padding: 50px 40px;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(253, 121, 168, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.auth-decoration-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.decoration-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 20px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.auth-decoration-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-decoration-content p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

.decoration-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    text-align: left;
}

.decoration-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.decoration-feature i {
    color: var(--accent);
    font-size: 0.9rem;
}

/* Decoration Shapes */
.decoration-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: shapeFloat 15s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation: shapeFloat 20s ease-in-out infinite reverse;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes shapeFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(20px, -20px); }
    66% { transform: translate(-10px, 10px); }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.2; }
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .auth-decoration {
        display: none;
    }

    .auth-card {
        padding: 40px 30px;
    }

    .auth-wrapper {
        max-width: 500px;
        min-height: auto;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 10px;
    }

    .auth-card {
        padding: 30px 20px;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .social-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-social {
        max-width: 100%;
        width: 100%;
    }

    .auth-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .decoration-features {
        grid-template-columns: 1fr;
    }
}
