* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Page Load Transition --- */
#pageContent {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#pageContent.visible {
    opacity: 1;
}
/* --- End Transition --- */

/*
    ====================================================================
    CRITICAL CHANGE #1: The body's background MUST be transparent
    so that the animated background container behind it can be seen.
    ====================================================================
*/
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.5;
    color: #0a0a0a;
    background-color: transparent; /* This is the most important change */
    font-size: 15px;
}

/* --- Loader Styles --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fafafa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s ease-out; /* Adjusted transition */
}

/* --- ADDED for initial loader fade --- */
#loader.hidden {
    opacity: 0;
    pointer-events: none;
}


.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loader-content .logo-container {
    transform: scale(3);
    margin-bottom: 48px;
}

#progressBarContainer {
    width: 250px;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 48px;
}

#progressBar {
    width: 0%;
    height: 100%;
    background-color: #FF883E;
    border-radius: 4px;
    transition: width 0.1s linear;
}

#loadingText {
    margin-top: 16px;
    font-size: 14px;
    color: #6b7280;
}

#quote-display {
    margin-top: 50px;
    width: 90%;
    max-width: 500px;
    color: #6b7280;
    font-size: 18px;
    font-style: italic;
    line-height: 1.4;
    opacity: 0;
    animation: fadeInQuote 1s ease 0.5s forwards;
    text-align: center;
}

#quote-author {
    margin-top: 20px;
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    text-align: right;
    width: 100%;
    color: #FF883E;
}

#quote-meta-info {
    text-align: right;
    width: 100%;
    margin-top: 4px;
    font-size: 14px;
    color: #9ca3af;
    font-style: normal;
}

.quote-flag {
    height: 14px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    border: 1px solid #e5e7eb;
}

@keyframes fadeInQuote {
    to {
        opacity: 1;
    }
}
/* --- End Loader Styles --- */

.container {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px;
    min-height: 100vh;
}

.header {
    margin-bottom: 48px;
    text-align: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.logo-container > a {
    text-decoration: none;
}

.logo-wrapper {
    background-color: #000;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    cursor: pointer;
}

/* Ensure these are still applied to the video/image elements */
.logo {
    height: 100%;
    width: 100%;
    object-fit: contain; /* Scales the content down to fit */
    margin-bottom: 0;
    opacity: 0.9;
}

/* This is the container for the right video */
.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    /* padding removed */
    border-radius: 8px;
    font-size: 38px; /* Still needed if text fallback */
    font-weight: 600; /* Still needed if text fallback */
    letter-spacing: -0.5px; /* Still needed if text fallback */
    margin-bottom: 0;
    height: 72px;
    cursor: pointer;
    overflow: hidden; /* Added to clip anything overflowing */
}

/* These text colors are only relevant if .brand contains text */
.brand-green { color: #169B62; }
.brand-white { color: #FFFFFF; }
.brand-orange { color: #FF883E; }


.tagline {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.footer {
    text-align: center;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #9ca3af;
}

.section {
    margin-bottom: 32px;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Keep flex-end */
    margin-bottom: 16px;
    gap: 8px; /* <<< CHANGED from 16px to 8px */
    flex-wrap: wrap; /* Keep wrap for flexibility */
}

.filter-group {
    display: flex; /* Keep flex */
    gap: 8px; /* Keep 8px */
    align-items: center;
    flex-wrap: nowrap; /* Prevent filter buttons wrapping internally */
}

.btn-group {
    display: flex;
    gap: 8px; /* Keep 8px */
    align-items: center;
    flex-wrap: wrap; /* Allow main buttons to wrap if needed */
    justify-content: flex-end; /* Align this group to the right */
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

/* === THIS RULE WAS MODIFIED === */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 18px;
    background: #fff;
    transition: all 0.2s ease;
    resize: vertical; /* <-- THIS LINE WAS ADDED */
}

.form-group input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0a0a0a;
    box-shadow: 0 0 0 3px rgba(10, 10, 10, 0.05);
}

.label-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #6b7280;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.info-btn:hover {
    background: #e5e7eb;
}

/* --- Password Strength & Toggle Styles --- */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 40px;
}

.password-toggle-btn {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0 12px;
    color: #6b7280;
    font-size: 16px;
}
.password-toggle-btn:hover {
    color: #111827;
}

.btn {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.btn.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-primary {
    background: #0a0a0a;
    color: #fff;
    border-color: #0a0a0a;
}

.btn-primary:hover {
    background: #1a1a1a;
}

.btn-primary:disabled {
    background: #a1a1aa;
    border-color: #a1a1aa;
    cursor: not-allowed;
}

.btn-ghost {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
}

.btn-ghost:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.contact-method-group {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.contact-method-group label, .remember-me-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.contact-method-group input[type="radio"],
.contact-method-group input[type="checkbox"], .remember-me-label input[type="checkbox"], .checkbox-label input[type="checkbox"] {
    width: auto;
    height: auto;
}

/* IMPORTANT FIX: Added !important */
.hidden {
    display: none !important;
}

.error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

.success {
    color: #16a34a;
    font-size: 13px;
    margin-top: 6px;
}

.btn-icon {
    border: none;
    background: transparent;
    padding: 6px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.15s ease;
}

.btn-icon:hover:not(:disabled) {
    background: #f3f4f6;
    color: #374151;
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.blurred-text {
    filter: blur(3px);
    user-select: none;
    cursor: default;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    position: relative;
}
.modal-overlay.visible .modal-content {
    transform: scale(1);
}
.modal-content h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #111827;
    text-align: center;
}

@keyframes pulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

.btn.pulse-red {
    animation: pulseRed 2s infinite;
    border-color: #dc2626;
    background-color: #fef2f2;
}


#tips-cloud {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    font-size: 14px;
    line-height: 1.6;
}

#tips-cloud.visible {
    opacity: 1;
    transform: translateY(0);
}

#tips-cloud p {
    margin: 0;
    white-space: pre-wrap;
    color: #334155;
}

#tips-cloud::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 30px;
    width: 0;
    height: 0;
    border: 10px solid transparent;
    border-top-color: #f1f5f9;
    border-bottom: 0;
}

.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    z-index: 1010;
}
.close-btn:hover {
    color: #334155;
}

#toastNotification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #0a0a0a;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1001;
    transition: bottom 0.5s ease-in-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-size: 14px;
    font-weight: 500;
}

#toastNotification.show {
    bottom: 30px;
}

#toastNotification p {
    margin: 0;
    padding: 0;
}

@keyframes pulseOrange {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 136, 62, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 136, 62, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 136, 62, 0);
  }
}

.pulse-orange {
  animation: pulseOrange 2s infinite;
  border-color: #FF883E;
}

#cookie-overlay {
    background: rgba(10, 10, 10, 0.75);
    z-index: 20000;
}
#cookie-modal {
    max-width: 500px;
    text-align: center;
}
#cookie-modal h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #111827;
}
#cookie-modal p {
    color: #374151;
    font-size: 15px;
    line-height: 1.6;
}

#cookie-modal .logo-container {
    transform: scale(0.8);
    margin-bottom: 20px;
}
#cookie-modal h3 {
    margin-bottom: 12px;
}

a.contact-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

a.contact-link:hover {
    text-decoration: underline;
}

/*
    ====================================================================
    START: NEW STYLES FOR ANIMATED BACKGROUND
    ====================================================================
*/

/*
    CRITICAL CHANGE #2: This container holds the animation and sits
    behind all other content on the page using z-index.
*/
#background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -1;
  background: linear-gradient(135deg, #2B7594 0%, #655900 100%);
}

#specks {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}

#scene {
    height: 100%;
    width: 100%;
    list-style-type: none;
}

.speck {
  opacity: 0;
  height: 4px;
  width: 4px;
  background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAABJJREFUCFtj/P//PwM2wASlAgCJXw4y13YkTwAAAABJRU5ErkJggg==');
  background-size: cover;
  position: absolute;
  border-radius: 10px;
}

.img {
  position: absolute;
  height: 100000px;
  width: 100000px;
  top: -8500px;
  left: -8000px;
  animation-timing-function: cubic-bezier(0.250, 0.250, 0.750, 0.750);
  animation-name: float;
  animation-iteration-count: infinite;
}

#img-1 {
  opacity: 0.25;
  background: url('https://www.transparenttextures.com/patterns/dust-and-scratches.png');
  background-repeat: repeat;
  animation-duration: 480s;
}

#img-2 {
  opacity: 0.2;
  background: url('https://www.transparenttextures.com/patterns/light-sketch.png');
  background-repeat: repeat;
  animation-duration: 360s;
}

#img-3 {
  opacity: 0.15;
  background: url('https://www.transparenttextures.com/patterns/subtle-grunge.png');
  background-repeat: repeat;
  animation-duration: 280s;
}

@keyframes twinkle {
  0% {
    transform: translate(0px, 0px);
    opacity: 0;
  }
  30% {
    opacity: 0;
  }
  50% {
    opacity: 0.75;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: translate(175px, 100px);
    opacity: 0;
  }
}

@keyframes float {
  0% {
    transform: translate(0px, 0px);
  }
  100% {
    transform:translate(8000px, 4000px);
  }
}



@media (max-width: 768px) {
    .loader-content .logo-container {
        transform: scale(1.2);
        margin-bottom: 32px;
    }

    .container {
        padding: 16px;
    }

    .header {
        margin-bottom: 32px;
    }
    .logo-container {
        gap: 12px;
    }
    .logo-wrapper, .brand {
        height: 60px;
    }
    .brand {
        font-size: 30px;
        /* Padding removed here too for consistency */
        /* padding: 6px 12px; */
    }

    /* --- START: Modified Mobile Controls Layout --- */
    .controls {
        flex-direction: column; /* Stack vertically */
        align-items: stretch;   /* Make items take full width initially */
        gap: 16px;             /* Increased gap for vertical stacking */
    }
    .controls .btn-group {
        order: 1; /* Show main buttons first */
        justify-content: center; /* Center the buttons within their line */
        /* flex-wrap: wrap; /* Keep wrap */ /* Already exists */
    }
    .controls .filter-group {
        order: 2; /* Show filter group second */
        width: 100%; /* Make it take full width */
        justify-content: flex-start; /* Align filter button(s) to the left */
        /* flex-wrap: nowrap; /* Keep nowrap */ /* Already exists */
    }
    /* --- END: Modified Mobile Controls Layout --- */

    .controls .btn-group .btn {
        padding-left: 12px;
        padding-right: 12px;
        font-size: 13px;
    }

    .modal-content h3 {
        font-size: 20px;
    }
}

.btn svg, .btn-icon svg, .vote-btn svg {
    pointer-events: none;
}

@media (max-width: 768px) {
    .btn, .vote-btn {
        padding-top: 12px;
        padding-bottom: 12px;
        min-height: 44px;
    }

    .btn-icon {
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
    }
}

/* =================================================================================
   NEW CHECKBOX/RADIO STYLES (BLACK THEME - NATIVE)
================================================================================== */
/* This rule changes the accent color of native browser checkboxes and radio buttons */
input[type="checkbox"],
input[type="radio"] {
    accent-color: #0a0a0a; /* Black */
}