/* ==================== GLOBAL STYLES & VARIABLES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #e02424;
    --primary-dark: #b31d1d;
    --dark-bg: #111111;
    --dark-card: #1f1f1f;
    --text-light: #f0f0f0;
    --text-medium: #a0a0a0;
    --text-dark: #333333;
    --border-color: #3a3a3a;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

/* ==================== HEADER & NAVIGATION ==================== */
.site-header {
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.brand i {
    color: var(--primary-color);
    margin-right: 10px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--primary-color);
}

/* ==================== FORM PAGE CONTAINER ==================== */
.form-page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 120px 20px 40px;
    background-color: var(--dark-bg);
}

.form-container {
    background-color: var(--dark-card);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    transition: all 0.3s ease-in-out;
}

/* ==================== FORM TOGGLES & FORMS ==================== */
.form-toggle-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.toggle-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    background: none;
    border: none;
    color: var(--text-medium);
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.toggle-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.toggle-btn.active-toggle {
    color: var(--text-light);
}

.toggle-btn.active-toggle::after {
    transform: scaleX(1);
}

.form {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form.active-form {
    display: block;
}

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

.form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-medium);
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 36, 36, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-medium);
}

.checkbox-container input {
    margin-right: 8px;
}

.form-link {
    color: var(--primary-color);
    font-weight: 500;
}
.form-link.back-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
}
.form-link.back-link i {
    margin-right: 5px;
}
.form-info {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}


/* ==================== BUTTONS & MESSAGES ==================== */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    padding: 15px;
}

.btn-submit:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.error-message {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    min-height: 1.2em; /* Prevents layout shift */
}

.form-messages {
    text-align: center;
    margin-top: 1.5rem;
    padding: 10px;
    border-radius: 5px;
    font-weight: 500;
}
.form-messages.success {
    background-color: rgba(30, 200, 135, 0.1);
    color: #1ec887;
}
.form-messages.error {
    background-color: rgba(224, 36, 36, 0.1);
    color: var(--primary-color);
}

/* ==================== FOOTER ==================== */
.site-footer {
    background-color: #000;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-about .brand {
    margin-bottom: 1rem;
}

.footer-about p {
    color: var(--text-medium);
    max-width: 300px;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-links ul li {
    margin-bottom: 0.5rem;
}

.footer-links ul li a {
    color: var(--text-medium);
}
.footer-links ul li a:hover {
    color: var(--primary-color);
}
.footer-contact p {
    color: var(--text-medium);
    margin-bottom: 0.5rem;
}
.footer-contact i {
    color: var(--primary-color);
    margin-right: 10px;
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a {
    color: var(--text-medium);
    font-size: 1.2rem;
    margin-right: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.social-icons a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* For a real site, implement a hamburger menu here */
    }
    .form-page-container {
        padding: 90px 15px 30px;
    }
    .form-container {
        padding: 2rem;
    }
}