  /* --- Color Variables --- */
        :root {
            --color-field-green: #38a169; /* Vibrant, energetic green */
            --color-field-dark: #0f172a;  /* Deep navy/slate background */
            --color-card-dark: #1e293b;   /* Slightly lighter dark for card */
            --color-input-dark: #334155;  /* Darker input background */
            --color-gold-hover: #ffcc00;  /* Gold for the hover state */
            --color-white: #ffffff;
            --color-gray-400: #9ca3af;
            --color-gray-300: #d1d5db;
            --color-red-400: #f87171;
            --color-shadow: rgba(0, 0, 0, 0.4);
        }

        /* --- Base Styles --- */
        body {
            background-color: var(--color-field-dark);
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 1rem;
            font-family: 'Inter', sans-serif;
            margin: 0;
            box-sizing: border-box;
        }

        /* --- Login Container (Main Card) --- */
        .login-container {
            position: relative;
            width: 100%;
            max-width: 900px;
            height: auto;
            display: flex;
            flex-direction: column;
            border-radius: 0.75rem; /* rounded-xl */
            box-shadow: 0 20px 25px -5px var(--color-shadow); /* shadow-2xl */
            overflow: hidden;
        }

        /* --- Visual Half (Left) --- */
        .visual-half {
            position: relative;
            width: 100%;
            background-color: var(--color-card-dark);
            /* background-image: url('https://placehold.co/1000x1200/1e293b/FFFFFF?text=Dynamic+Soccer+Action'); */
            background-size: cover;
            background-position: center;
            height: 16rem; /* h-64 on mobile */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .dark-overlay {
            position: absolute;
            inset: 0;
            background-color: var(--color-field-dark);
            opacity: 0.7;
            /* backdrop-filter: blur(4px); */
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .overlay-content {
            position: relative;
            z-index: 10;
            text-align: center;
            padding: 2rem;
        }

        .overlay-content h1 {
            font-size: 2.5rem; /* text-4xl/5xl */
            font-weight: 800; /* font-extrabold */
            color: var(--color-white);
            line-height: 1.25;
            margin-bottom: 0.5rem;
        }

        .overlay-content p {
            color: rgba(255, 255, 255, 0.8);
            font-size: 1.125rem; /* text-lg */
        }


        /* --- Form Half (Right) --- */
        .form-half {
            width: 100%;
            background-color: var(--color-card-dark);
            padding: 2rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .header-content {
            text-align: center;
            margin-bottom: 2.5rem; /* mb-10 */
        }

        .header-content i {
            /* color: var(--color-field-green); */
            color: var(--color-gold-hover) !important;
            font-size: 3rem; /* text-5xl */
            margin-bottom: 0.75rem;
        }

        .header-content h2 {
            font-size: 1.875rem; /* text-3xl */
            font-weight: 700; /* font-bold */
            color: var(--color-white);
            margin-bottom: 0.5rem;
        }

        .header-content p {
            color: var(--color-gray-400);
        }

        /* --- Form Elements --- */
        .input-group {
            margin-bottom: 1.25rem; /* mb-5 */
        }

        .input-group label {
            display: block;
            font-size: 0.875rem; /* text-sm */
            font-weight: 500; /* font-medium */
            color: var(--color-gray-300);
            margin-bottom: 0.5rem;
        }

        .input-group input {
            width: 100%;
            padding: 0.75rem 1rem; /* px-4 py-3 */
            border-radius: 0.5rem; /* rounded-lg */
            background-color: var(--color-input-dark);
            color: var(--color-white);
            border: 1px solid transparent;
            box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.2); /* shadow-inner */
            transition: border-color 200ms, box-shadow 200ms;
        }

        .input-group input:focus {
            outline: none;
            border-color: var(--color-field-green);
            box-shadow: 0 0 0 1px var(--color-field-green); /* ring-1 */
        }
        
        /* --- Checkbox / Forgot Password --- */
        .options-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem; /* mb-8 */
            font-size: 0.875rem; /* text-sm */
        }

        .options-bar label {
            display: flex;
            align-items: center;
            color: var(--color-gray-400);
            cursor: pointer;
        }

        .options-bar input[type="checkbox"] {
            appearance: none;
            height: 1rem;
            width: 1rem;
            border-radius: 0.125rem; /* rounded-sm */
            background-color: var(--color-input-dark);
            border: 1px solid #475569; /* border-gray-600 */
            margin-right: 0.5rem;
            cursor: pointer;
            position: relative;
        }

        .options-bar input[type="checkbox"]:checked {
            background-color: var(--color-field-green);
            border-color: var(--color-field-green);
        }

        .options-bar a {
            color: var(--color-field-green);
            transition: color 200ms;
        }

        .options-bar a:hover {
            color: #48bb78; /* A lighter green for hover */
        }

        /* --- Login Button --- */
        .login-button {
            width: 100%;
            background-color: var(--color-field-green);
            color: var(--color-white);
            font-weight: 600; /* font-semibold */
            padding: 0.75rem 1rem; /* py-3 */
            border-radius: 0.5rem; /* rounded-lg */
            border: none;
            cursor: pointer;
            transition: background-color 300ms, transform 300ms, box-shadow 300ms;
            box-shadow: 0 10px 15px -3px rgba(56, 161, 105, 0.3); /* custom shadow to match theme */
        }

        .login-button:hover {
            background-color: var(--color-gold-hover);
            color: var(--color-field-dark); 
            transform: scale(1.01);
            box-shadow: 0 10px 15px -3px rgba(255, 204, 0, 0.5); /* gold shadow on hover */
        }

        /* --- Footer Link --- */
        .signup-text {
            text-align: center;
            color: var(--color-gray-400);
            margin-top: 2rem; /* mt-8 */
            font-size: 0.875rem; /* text-sm */
        }

        .signup-text a {
            color: var(--color-field-green);
            font-weight: 500;
            text-decoration: none;
        }

        .signup-text a:hover {
            text-decoration: underline;
        }

        /* --- Responsive Styles (Medium breakpoint: 768px) --- */
        @media (min-width: 768px) {
            .login-container {
                flex-direction: row;
                height: 600px; /* md:h-[600px] */
            }
            .visual-half {
                width: 50%; /* md:w-1/2 */
                height: 100%; /* md:h-full */
            }
            .form-half {
                width: 50%; /* md:w-1/2 */
                padding: 3rem; /* md:p-12 */
            }
            .overlay-content h1 {
                font-size: 3rem; /* md:text-5xl */
            }
        }

        #preloader {
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: #121212;
          display: flex;
          justify-content: center;
          align-items: center;
          z-index: 9999;
        }

        /* Soccer ball */
        .ball {
          width: 50px;
          height: 50px;
            background: url('/static/images/ball.png') no-repeat center center;
          background-size: cover;
          border-radius: 50%;
          animation: bounce 1s infinite ease-in-out;
        }

        /* Bounce animation */
        @keyframes bounce {
          0%, 100% { transform: translateY(0); }
          50% { transform: translateY(-60px); }
        }


        /* Custom Error Message Style */
        .error-feedback-container {
            display: flex;
            align-items: center;
            /* Use a color for the background that contrasts but is softer than pure red */
            background-color: rgba(220, 53, 69, 0.15); /* Soft red background */
            border: 1px solid var(--color-red-400); /* Red border from your theme */
            color: var(--color-red-400); /* Text color */
            padding: 0.75rem 1rem;
            border-radius: 6px; /* Slightly rounded corners */
            font-size: 0.95rem;
            margin-top: 1rem; /* Adjust spacing above the form */
        }

        .error-icon {
            margin-right: 0.75rem;
            font-size: 1.1rem;
            /* Optionally make the icon a brighter red */
            color: #ff4747; 
        }

        .error-text {
            font-weight: 500;
        }

        .field-error-message {
            color: var(--color-red-400); /* Use your existing error color */
            font-size: 0.85rem;
            margin-top: 0.3rem;
            /* Adjust this margin to manage space before the options-bar */
            margin-bottom: 1rem; 
            font-weight: 500;
            /* Move it slightly right to align with the input text */
            padding-left: 2rem; 
        }