/* ==============================================
   CinéMate - Login & Register Pages Styles
   Modern Authentication UI
   ============================================== */

/* ============= Root Variables ============= */
:root {
    --primary-color: #e5a00d;
    --primary-dark: #cc8f0c;
    --secondary-color: #1f1f1f;
    --accent-color: #00a8e8;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --bg-dark: #0d0d0d;
    --bg-darker: #050505;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --error-color: #f44336;
    --success-color: #4caf50;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============= Reset & Base ============= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    min-height: 100vh;
}

/* ============= Split Container ============= */
.auth-split-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ============= Left Side (Image/Branding) ============= */
.auth-left {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/default_bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    z-index: 0;
}

.auth-left-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        var(--primary-color-alpha) 0%,
        var(--accent-color-alpha) 100%
    );
    z-index: 1;
}

.auth-left-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
    animation: fadeInLeft 0.8s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.brand-icon {
    font-size: 3.5rem !important;
    color: var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.brand h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Artwork/Illustration */
.auth-artwork {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.artwork-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    background: var(--accent-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 1s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    background: var(--primary-color);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-20px) scale(1.05);
    }
}

.artwork-icon {
    position: relative;
    z-index: 10;
    font-size: 5rem !important;
    color: var(--primary-color);
    text-shadow: 0 0 30px rgba(229, 160, 13, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.auth-left-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.auth-left-content > p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.feature-item .material-icons {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* ============= Right Side (Form) ============= */
.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--bg-dark);
    overflow-y: auto;
}

.auth-right-content {
    width: 100%;
    max-width: 480px;
    animation: fadeInRight 0.8s ease-out;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============= Auth Header ============= */
.auth-header {
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.auth-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.alert .material-icons {
    font-size: 1.5rem;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #ff6b6b;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #69db7c;
}

.alert-info {
    background: var(--accent-color-alpha);
    border: 1px solid var(--accent-color);
    color: #4dabf7;
}

/* ============= Form Styles ============= */
.auth-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group label .material-icons {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 160, 13, 0.1);
}

.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.form-group small {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============= Buttons ============= */
.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn .material-icons {
    font-size: 1.25rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-dark);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 160, 13, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============= Auth Footer ============= */
.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.auth-footer p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
}

.back-link .material-icons {
    font-size: 1.125rem;
}

.back-link:hover {
    color: var(--text-primary) !important;
}

/* ============= Form Validation ============= */
input:invalid:not(:placeholder-shown) {
    border-color: rgba(244, 67, 54, 0.5);
}

input:valid:not(:placeholder-shown) {
    border-color: rgba(76, 175, 80, 0.5);
}

/* ============= Loading State ============= */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============= Responsive ============= */
@media (max-width: 1024px) {
    .auth-left {
        padding: 2rem;
    }
    
    .auth-right {
        padding: 2rem;
    }
    
    .brand h1 {
        font-size: 2rem;
    }
    
    .auth-left-content h2 {
        font-size: 1.75rem;
    }
    
    .auth-artwork {
        width: 160px;
        height: 160px;
    }
    
    .circle-1 {
        width: 160px;
        height: 160px;
    }
    
    .circle-2 {
        width: 120px;
        height: 120px;
    }
    
    .circle-3 {
        width: 80px;
        height: 80px;
    }
    
    .artwork-icon {
        font-size: 4rem !important;
    }
}

@media (max-width: 768px) {
    .auth-split-container {
        flex-direction: column;
    }
    
    .auth-left {
        min-height: 40vh;
        padding: 2rem 1.5rem;
    }
    
    .auth-left-content h2 {
        font-size: 1.5rem;
    }
    
    .auth-left-content > p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .brand {
        margin-bottom: 2rem;
    }
    
    .brand h1 {
        font-size: 1.75rem;
    }
    
    .brand-icon {
        font-size: 2.5rem !important;
    }
    
    .auth-artwork {
        width: 120px;
        height: 120px;
        margin-bottom: 2rem;
    }
    
    .circle-1 {
        width: 120px;
        height: 120px;
    }
    
    .circle-2 {
        width: 90px;
        height: 90px;
    }
    
    .circle-3 {
        width: 60px;
        height: 60px;
    }
    
    .artwork-icon {
        font-size: 3rem !important;
    }
    
    .features-list {
        display: none;
    }
    
    .auth-right {
        min-height: 60vh;
        padding: 2rem 1.5rem;
    }
    
    .auth-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .auth-left {
        min-height: 35vh;
        padding: 1.5rem 1rem;
    }
    
    .brand h1 {
        font-size: 1.5rem;
    }
    
    .auth-left-content h2 {
        font-size: 1.25rem;
    }
    
    .auth-left-content > p {
        font-size: 0.9rem;
    }
    
    .auth-right {
        padding: 1.5rem 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .form-group input {
        padding: 0.75rem 0.875rem;
    }
}

/* ============= Accessibility ============= */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ============= Print Styles ============= */
@media print {
    .background-image,
    .background-overlay,
    .back-link {
        display: none;
    }
    
    .auth-box {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================
   REGISTER SPECIFIC STYLES
   ============================================ */

/* Additional form spacing for register (more fields) */
.auth-right-content .auth-form {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for form */
.auth-right-content .auth-form::-webkit-scrollbar {
    width: 6px;
}

.auth-right-content .auth-form::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.auth-right-content .auth-form::-webkit-scrollbar-thumb {
    background: rgba(229, 160, 13, 0.3);
    border-radius: 3px;
}

.auth-right-content .auth-form::-webkit-scrollbar-thumb:hover {
    background: rgba(229, 160, 13, 0.5);
}

/* Alert Warning Style */
.alert-warning {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    border: 2px solid rgba(255, 152, 0, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.2);
    animation: pulseWarning 2s ease-in-out infinite;
}

.alert-warning h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.alert-warning p {
    font-size: 1rem;
    line-height: 1.6;
}

@keyframes pulseWarning {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 152, 0, 0.2);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 152, 0, 0.4);
    }
}
