/* ============================================
   DURAKATHANA - AUTHENTICATION LAYOUT
   Unified styles for Login, Register, Forgot Password
   ============================================ */

/* Import Global Design System */
@import url('./global-design-system.css');

/* ============================================
   AUTH CONTAINER
   ============================================ */

.auth-container {
    width: 100%;
    min-height: calc(100vh - 150px);
    /* Adjust for header/footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl) var(--space-md);
    position: relative;
    background: transparent;
    /* Background handled by body/global */
}

/* Background Pulse Effect */
.auth-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 0, 0, 0.05), transparent 70%);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
    z-index: 0;
}

/* ============================================
   AUTH CARD
   ============================================ */

.auth-card {
    width: 100%;
    max-width: 500px;
    /* Default for Login */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), var(--shadow-red);
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
    border: 1px solid var(--glass-border);
    position: relative;
    z-index: 1;
}

/* Wide variant for Registration forms */
.auth-card.wide {
    max-width: 800px;
}

/* Red Line Accents */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-red), transparent);
}

/* ============================================
   AUTH HEADER
   ============================================ */

.auth-header {
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.95) 0%, rgba(10, 10, 10, 0.95) 100%);
    padding: var(--space-xl) var(--space-lg);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.auth-header h2 {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--font-black);
    color: var(--color-white);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.auth-header p {
    color: var(--color-gray-300);
    margin-top: var(--space-xs);
    margin-bottom: 0;
    font-family: var(--font-primary);
    font-size: var(--text-sm);
}

/* Underline decoration */
.auth-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--color-red);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.8);
    border-radius: var(--radius-full);
}

/* ============================================
   AUTH FORM CONTENT
   ============================================ */

.auth-form {
    padding: var(--space-2xl);
}

/* Form Groups */
.input-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.input-group label {
    display: block;
    font-family: var(--font-secondary);
    font-weight: var(--font-bold);
    font-size: var(--text-xs);
    color: var(--color-gray-300);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.input-group label i {
    color: var(--color-red);
    margin-right: var(--space-xs);
}

/* Input Fields */
.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-gray-600);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--text-base);
    color: var(--color-white);
    transition: all var(--transition-fast);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--color-red);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.1);
}

.input-group input::placeholder {
    color: var(--color-gray-500);
}

/* Password Toggle Icon */
.pass-field {
    position: relative;
    width: 100%;
}

.pass-field input {
    padding-right: 45px !important;
    /* Prevent text overlapping with icon */
}

.pass-field i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-gray-400);
    cursor: pointer;
    transition: color var(--transition-fast);
    z-index: 10;
    /* Ensure it's above input */
}

.pass-field i:hover {
    color: var(--color-red);
}

/* Password Requirements List */
.requirement-list {
    list-style: none;
    padding: 0;
    margin-top: var(--space-sm);
}

.requirement-list li {
    font-size: var(--text-xs);
    color: var(--color-gray-400);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    transition: color var(--transition-fast);
}

.requirement-list li i {
    margin-right: var(--space-sm);
    font-size: 8px;
}

.requirement-list li.valid {
    color: var(--color-success);
}

.requirement-list li.valid i {
    color: var(--color-success);
}

/* Select Dropdown Arrow */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ff0000'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 40px;
}

/* File Input */
input[type="file"]::file-selector-button {
    background: var(--color-gray-700);
    color: var(--color-white);
    border: none;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    margin-right: var(--space-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: var(--text-xs);
    font-family: var(--font-secondary);
    text-transform: uppercase;
}

input[type="file"]::file-selector-button:hover {
    background: var(--color-red);
}

/* Actions (Submit Button) */
.auth-actions {
    margin-top: var(--space-xl);
    text-align: center;
}

.auth-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-red);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-secondary);
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.auth-btn:hover {
    background: var(--color-red-light);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
}

.auth-btn:disabled {
    background: var(--color-gray-600);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ReCaptcha Align */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: var(--space-lg) 0;
}

/* Footer Links (Forgot Pass, etc.) */
.auth-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-footer a {
    color: var(--color-gray-300);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.auth-footer a:hover {
    color: var(--color-red);
}

/* Form Grid for Wide Forms (Registration) */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

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

    /* Span full width */
    .full-width {
        grid-column: 1 / -1;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    .auth-container {
        padding: var(--space-lg) var(--space-sm);
    }

    .auth-card {
        border-radius: var(--radius-lg);
    }

    .auth-form {
        padding: var(--space-lg);
    }

    .auth-header h2 {
        font-size: var(--text-2xl);
    }
}