/* ==========================================================================
   CAT999 - AUTH PAGES STYLESHEET
   Login & Register Pages
   Dark Mode - Purple/Violet Accent Theme
   ========================================================================== */

/* ==========================================================================
   AUTH SECTION
   ========================================================================== */
.auth-section {
    min-height: calc(100vh - 180px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    padding-bottom: 6rem;
    background:
        radial-gradient(ellipse at top center, rgba(155, 93, 229, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at bottom left, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        radial-gradient(ellipse at bottom right, rgba(0, 245, 212, 0.05) 0%, transparent 40%);
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.auth-section::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(155, 93, 229, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.auth-section::after {
    content: '';
    position: absolute;
    bottom: 20%;
    right: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 245, 212, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   AUTH CARD
   ========================================================================== */
.auth-card {
    background: linear-gradient(165deg, rgba(26, 26, 46, 0.97) 0%, rgba(13, 13, 20, 0.99) 100%);
    border: 1px solid rgba(155, 93, 229, 0.2);
    border-radius: 20px;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(155, 93, 229, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9b5de5, #00f5d4, #9b5de5);
    background-size: 200% 100%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.auth-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(155, 93, 229, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* ==========================================================================
   AUTH HEADER
   ========================================================================== */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.auth-header h1 {
    font-family: 'Prompt', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary, #ffffff);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    background: linear-gradient(135deg, #ffffff 0%, #9b5de5 50%, #00f5d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   AUTH FORM
   ========================================================================== */
.auth-form {
    position: relative;
    z-index: 1;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    color: var(--text-primary, #ffffff);
    font-family: 'Sarabun', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-form .form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: 'Sarabun', sans-serif;
    font-size: 1rem;
    color: var(--text-primary, #ffffff);
    background: rgba(26, 26, 46, 0.9);
    border: 1px solid rgba(155, 93, 229, 0.3);
    border-radius: 14px;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.auth-form .form-input:focus {
    border-color: #9b5de5;
    box-shadow:
        0 0 0 4px rgba(155, 93, 229, 0.15),
        0 0 20px rgba(155, 93, 229, 0.15);
    background: rgba(26, 26, 46, 1);
}

.auth-form .form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-form .form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   AUTH BUTTONS
   ========================================================================== */
.auth-form .btn-primary,
.auth-card .btn-primary.btn-full {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #9b5de5 0%, #7c3aed 50%, #8b5cf6 100%);
    color: #ffffff;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(155, 93, 229, 0.4),
        0 0 20px rgba(155, 93, 229, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-form .btn-primary::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;
}

.auth-form .btn-primary:hover::before {
    left: 100%;
}

.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #9b5de5 100%);
    transform: translateY(-2px);
    box-shadow:
        0 6px 25px rgba(155, 93, 229, 0.5),
        0 0 30px rgba(155, 93, 229, 0.3);
}

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

/* ==========================================================================
   AUTH DIVIDER
   ========================================================================== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.75rem 0;
    position: relative;
    z-index: 1;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(155, 93, 229, 0.4), transparent);
}

.auth-divider span {
    padding: 0 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================================================
   AUTH ALTERNATE ACTION
   ========================================================================== */
.auth-card .btn-outline,
.auth-card .btn-outline.btn-full {
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    color: #00f5d4;
    font-family: 'Prompt', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #00f5d4;
    border-radius: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.auth-card .btn-outline:hover {
    background: rgba(0, 245, 212, 0.1);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow:
        0 4px 20px rgba(0, 245, 212, 0.25),
        0 0 15px rgba(0, 245, 212, 0.15);
}

/* ==========================================================================
   TRUST SIGNALS
   ========================================================================== */
.auth-trust-signals {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(155, 93, 229, 0.2);
    position: relative;
    z-index: 1;
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Sarabun', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    min-width: 70px;
}

.trust-item svg {
    width: 32px;
    height: 32px;
    color: #9b5de5;
    filter: drop-shadow(0 0 6px rgba(155, 93, 229, 0.5));
    transition: all 0.3s ease;
}

.trust-item:hover svg {
    color: #00f5d4;
    filter: drop-shadow(0 0 8px rgba(0, 245, 212, 0.6));
    transform: scale(1.1);
}

.trust-item span {
    transition: color 0.3s ease;
}

.trust-item:hover span {
    color: #ffffff;
}

/* ==========================================================================
   RESPONSIVE - EXTRA SMALL MOBILE (< 360px)
   ========================================================================== */
@media (max-width: 359px) {
    .auth-section {
        padding: 1.5rem 0.75rem;
        padding-bottom: 5.5rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }

    .auth-header h1 {
        font-size: 1.15rem;
    }

    .auth-form .form-input {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .auth-form .btn-primary,
    .auth-card .btn-outline {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    .trust-items {
        gap: 1rem;
    }

    .trust-item {
        min-width: 60px;
    }

    .trust-item svg {
        width: 28px;
        height: 28px;
    }

    .trust-item span {
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   RESPONSIVE - SMALL MOBILE (360px - 479px)
   ========================================================================== */
@media (min-width: 360px) and (max-width: 479px) {
    .auth-section {
        padding: 2rem 1rem;
        padding-bottom: 6rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .auth-header h1 {
        font-size: 1.25rem;
    }

    .trust-items {
        gap: 1.25rem;
    }
}

/* ==========================================================================
   RESPONSIVE - MEDIUM MOBILE (480px - 575px)
   ========================================================================== */
@media (min-width: 480px) {
    .auth-section {
        padding: 2.5rem 1.5rem;
        padding-bottom: 6rem;
    }

    .auth-container {
        max-width: 420px;
    }

    .auth-card {
        padding: 2rem 1.75rem;
    }

    .auth-header h1 {
        font-size: 1.4rem;
    }

    .trust-items {
        gap: 1.75rem;
    }

    .trust-item svg {
        width: 36px;
        height: 36px;
    }

    .trust-item span {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   RESPONSIVE - LARGE MOBILE / PHABLET (576px - 767px)
   ========================================================================== */
@media (min-width: 576px) {
    .auth-section {
        padding: 3rem 1.5rem;
        padding-bottom: 6rem;
    }

    .auth-card {
        padding: 2.25rem 2rem;
        border-radius: 22px;
    }

    .auth-header h1 {
        font-size: 1.5rem;
    }

    .trust-items {
        gap: 2rem;
    }

    .trust-item {
        min-width: 80px;
    }

    .trust-item svg {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================================
   RESPONSIVE - TABLET (768px+)
   ========================================================================== */
@media (min-width: 768px) {
    .auth-section {
        padding: 4rem 2rem;
        padding-bottom: 5rem;
        min-height: calc(100vh - 200px);
    }

    .auth-container {
        max-width: 440px;
    }

    .auth-card {
        padding: 2.5rem 2.25rem;
        border-radius: 24px;
    }

    .auth-header h1 {
        font-size: 1.65rem;
    }

    .auth-form .form-input {
        padding: 1.125rem 1.5rem;
    }

    .auth-form .btn-primary,
    .auth-card .btn-outline {
        padding: 1.125rem 1.75rem;
        font-size: 1.1rem;
    }

    .trust-items {
        gap: 2.5rem;
    }

    .trust-item svg {
        width: 40px;
        height: 40px;
    }

    .trust-item span {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   RESPONSIVE - DESKTOP (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
    .auth-section {
        padding: 5rem 3rem;
        padding-bottom: 4rem;
    }

    .auth-container {
        max-width: 460px;
    }

    .auth-card {
        padding: 3rem 2.5rem;
    }

    .auth-header h1 {
        font-size: 1.75rem;
    }

    .trust-items {
        gap: 3rem;
    }

    .trust-item {
        min-width: 90px;
    }

    .trust-item svg {
        width: 44px;
        height: 44px;
    }

    .trust-item span {
        font-size: 0.9rem;
    }
}

/* ==========================================================================
   RESPONSIVE - LARGE DESKTOP (1280px+)
   ========================================================================== */
@media (min-width: 1280px) {
    .auth-section {
        padding: 6rem 4rem;
    }

    .auth-container {
        max-width: 480px;
    }

    .auth-card {
        padding: 3.5rem 3rem;
    }

    .auth-header h1 {
        font-size: 1.85rem;
    }
}

/* ==========================================================================
   RESPONSIVE - EXTRA LARGE (1536px+)
   ========================================================================== */
@media (min-width: 1536px) {
    .auth-section::before {
        width: 400px;
        height: 400px;
    }

    .auth-section::after {
        width: 350px;
        height: 350px;
    }
}

/* ==========================================================================
   ACCESSIBILITY - REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .auth-card::before {
        animation: none;
    }

    .auth-form .btn-primary::before {
        transition: none;
    }

    .auth-form .btn-primary:hover::before {
        left: -100%;
    }

    .trust-item svg,
    .auth-form .btn-primary,
    .auth-card .btn-outline {
        transition: none;
    }
}
