/* ========== ROOT VARIABLES (SEMI-CLASSIC THEME) ========== */
:root {
    /* Palette */
    --navy-primary: #1a252f;
    --navy-secondary: #2c3e50;
    --gold-accent: #c0a062;
    --gold-light: #e6dace;
    --cream-bg: #f9f9f7;
    --white: #ffffff;
    --text-dark: #333333;
    --text-muted: #666666;
    
    /* Layout */
    --radius: 4px; /* Sharper corners for classic look */
    --radius-lg: 8px;
    
    /* Effects */
    --shadow-card: 0 5px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Lato', 'Segoe UI', sans-serif;
    background-color: var(--cream-bg);
    color: var(--text-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ========== Main Wrapper ========== */
.main-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ========== Back to Home Button ========== */
.back-home-btn {
    position: absolute;
    top: 30px;
    left: 40px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--navy-primary);
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
    transition: var(--transition);
}

.back-home-btn:hover {
    color: var(--gold-accent);
    transform: translateX(-5px);
}

/* ========== Container (Card) ========== */
.container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    padding: 0; /* Padding handled by internal elements */
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    /* Custom Scrollbar for Container */
    scrollbar-width: thin;
    scrollbar-color: var(--gold-accent) #f1f1f1;
}

.container::-webkit-scrollbar {
    width: 6px;
}
.container::-webkit-scrollbar-thumb {
    background-color: var(--gold-accent);
    border-radius: 4px;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Gold Accent Strip */
.card-header-strip {
    height: 6px;
    background: var(--gold-accent);
    width: 100%;
}

/* ========== Logo Section ========== */
.logo-section {
    text-align: center;
    padding: 40px 40px 10px 40px;
    background: #fdfdfd;
    border-bottom: 1px solid #eee;
}

.logo-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    width: 100%;
    height: auto;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4em;
    font-weight: 700;
    color: var(--navy-primary);
    letter-spacing: -0.5px;
}

/* ========== Form Box ========== */
.form-box {
    position: relative;
    padding: 30px 40px 40px 40px;
    min-height: 400px; /* Ensure height for transitions */
}

/* Form Container Transition Logic */
.form-container {
    position: absolute;
    top: 30px;
    left: 40px;
    right: 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.4s ease-in-out;
}

.form-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative;
    top: auto;
    left: auto;
    right: auto;
}

.form-container h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--navy-primary);
    text-align: center;
}

.form-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95em;
    font-style: italic;
}

/* ========== Inputs ========== */
.input-box {
    position: relative;
    margin-bottom: 20px;
}

.input-box i {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: var(--navy-secondary);
    font-size: 1em;
    pointer-events: none;
    transition: color 0.3s;
}

.input-box input,
.input-box select {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    outline: none;
    font-size: 1em;
    background: var(--white);
    color: var(--text-dark);
    font-family: 'Lato', sans-serif;
    transition: border-color 0.3s;
}

.input-box select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231a252f%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px top 50%;
    background-size: 10px auto;
}

.input-box input:focus,
.input-box select:focus {
    border-color: var(--navy-primary);
    box-shadow: 0 0 0 2px rgba(26, 37, 47, 0.1);
}

.input-box input:focus ~ i,
.input-box select:focus ~ i {
    color: var(--gold-accent);
}

.input-box input::placeholder {
    color: #999;
}

/* ========== Suggestions ========== */
#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    max-height: 150px;
    overflow-y: auto;
    z-index: 10;
    box-shadow: var(--shadow-hover);
    list-style: none;
}

#suggestions li {
    padding: 10px 15px 10px 45px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--text-dark);
}

#suggestions li:hover {
    background: #f0f0f0;
}

/* ========== Remember & Forgot ========== */
.remember {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.remember input[type="checkbox"] {
    accent-color: var(--navy-primary);
}

.remember a {
    color: var(--navy-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.remember a:hover {
    color: var(--gold-accent);
    text-decoration: underline;
}

/* ========== Buttons ========== */
.btn {
    width: 100%;
    padding: 15px;
    background: var(--navy-primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Lato', sans-serif;
}

.btn:hover {
    background: var(--gold-accent);
    color: var(--navy-primary);
    transform: translateY(-2px);
}

/* ========== Create Account Link ========== */
.create {
    text-align: center;
    margin: 25px 0;
    font-size: 0.95em;
    color: var(--text-muted);
}

.create a {
    color: var(--navy-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
}

.create a:hover {
    color: var(--gold-accent);
}

/* ========== Social Login ========== */
.social-login {
    text-align: center;
    margin-top: 20px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #999;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.divider span {
    padding: 0 15px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    color: var(--navy-primary);
    font-size: 1.2em;
    transition: all 0.3s;
    background: var(--cream-bg);
}

.social-btn:hover {
    background: var(--navy-primary);
    color: var(--white);
    border-color: var(--navy-primary);
    transform: translateY(-2px);
}

/* ========== Cookie Consent ========== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--navy-primary);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    z-index: 10000;
    display: none;
    border-top: 3px solid var(--gold-accent);
}

.cookie-consent.show {
    display: block;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text h4 {
    margin: 0 0 5px 0;
    font-family: 'Playfair Display', serif;
    color: var(--gold-accent);
}

.cookie-text p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: all 0.3s;
}

.cookie-btn.accept {
    background: var(--gold-accent);
    color: var(--navy-primary);
}

.cookie-btn.accept:hover {
    background: var(--white);
}

.cookie-btn.decline {
    background: transparent;
    border: 1px solid #aaa;
    color: #ccc;
}

.cookie-btn.decline:hover {
    border-color: var(--white);
    color: var(--white);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .back-home-btn {
        top: 20px;
        left: 20px;
    }
    
    .container {
        max-width: 90%;
        margin-top: 60px; /* Space for back button */
    }
    
    .form-box {
        padding: 30px 25px;
    }
    
    .form-container h2 {
        font-size: 1.8em;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.2em;
    }
    
    .form-box {
        padding: 20px 20px 30px 20px;
    }
    
    .input-box input, .input-box select {
        font-size: 0.95em;
    }
}