/*
   IMPORTANT: For SolaimanLipi, you need to host the font files yourself
   and replace the 'path/to/...' URLs below with the actual paths to your files.
   Typical formats are .woff2 (for modern browsers), .woff, and .ttf as fallbacks.
*/
@font-face {
    font-family: 'SolaimanLipi';
    src: url('path/to/SolaimanLipi.woff2') format('woff2'),
         url('path/to/SolaimanLipi.woff') format('woff'),
         url('path/to/SolaimanLipi.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Ensures text is visible while font loads */
}

/* Universal Styles & Variables */
:root {
    --color-orange-light: #ffebcc;
    --color-orange-dark: #ff7e5f;
    --color-blue-light: #91EAE4;
    --color-blue-dark: #3498db;
    --color-red: #e74c3c;
    --color-green: #28a745;
    --color-text-dark: #2c3e50;
    --color-text-light: #555;
    --color-white: #ffffff;
    --color-bg-gradient-start: #feb47b; /* Warm Peach */
    --color-bg-gradient-end: #86A8E7;   /* Soft Blue */
    --color-login-bg: rgba(255, 255, 255, 0.2); /* Very light translucent white */


    --shadow-light: 0 4px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-strong: 0 15px 35px rgba(0, 0, 0, 0.2);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.06);

    --border-radius-base: 18px; /* Slightly larger radius */
    --transition-speed: 0.35s; /* Slightly slower for smoother feel */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Apply SolaimanLipi font globally, with a generic sans-serif fallback */
    font-family: 'SolaimanLipi', sans-serif;
    background: linear-gradient(270deg, var(--color-bg-gradient-start), var(--color-bg-gradient-end), var(--color-bg-gradient-start), var(--color-blue-light));
    background-size: 800% 800%;
    animation: gradientAnimation 18s ease infinite; /* Slightly slower animation */
    color: var(--color-text-dark);
    min-height: 100vh; /* Ensure background covers full height even if content is short */
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow-x: hidden; /* Prevent horizontal scrollbar from gradient animation */
    overflow-y: auto; /* Allow vertical scrolling if content exceeds viewport */
}

/* Dynamic Background Animation */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeOut 1s ease 2.5s forwards;
}

.splash-logo {
    width: 160px; /* Slightly larger splash logo */
    animation: zoomIn 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* More bouncy zoom */
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, var(--color-bg-gradient-start), var(--color-bg-gradient-end), var(--color-bg-gradient-start), var(--color-blue-light));
    background-size: 800% 800%;
    animation: gradientAnimation 18s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.login-container {
    background: var(--color-login-bg); /* Use translucent white */
    padding: 40px;
    border-radius: var(--border-radius-base);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.3); /* Stronger outer shadow, subtle inner border */
    text-align: center;
    max-width: 450px; /* Slightly wider */
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.4); /* Clearer translucent border */
    backdrop-filter: blur(10px); /* Stronger blur effect */
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: transform 0.5s ease-out;
}

/* Add a subtle animation to the login container on load/show */
.login-screen:not(.hidden) .login-container {
    animation: slideInUp 0.7s ease-out forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.login-logo {
    width: 120px; /* Slightly larger */
    margin-bottom: 30px; /* More space below logo */
}

.login-container h2 {
    color: var(--color-white); /* White heading for contrast */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); /* Clearer shadow */
    margin-bottom: 35px; /* More space below heading */
    font-size: 2.2rem; /* Larger heading */
    font-weight: 700; /* Bolder font */
}

.input-group {
    margin-bottom: 20px;
    position: relative; /* For icon positioning */
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px; /* More padding, space for icon */
    border: none; /* Remove default border */
    border-radius: 12px; /* More rounded */
    font-size: 1.1rem;
    outline: none;
    background-color: rgba(255, 255, 255, 0.9); /* Slightly opaque white background */
    box-shadow: var(--shadow-light), inset 0 1px 3px rgba(0, 0, 0, 0.05); /* Subtle shadow and inner shadow */
    transition: all var(--transition-speed) ease;
    color: var(--color-text-dark);
}

.input-group input::placeholder {
    color: #888;
    opacity: 0.8;
}

.input-group input:focus {
    background-color: var(--color-white);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.4), var(--shadow-medium); /* Stronger glow effect */
}

/* Input Icons */
.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
}
.input-group input:focus + .input-icon {
    opacity: 1; /* Make icon more prominent on focus */
}

.user-icon {
    /* Simple SVG or icon font would be better, but for CSS-only */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%233498db" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
}

.lock-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%233498db" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>');
}

/* Toggle Password Visibility */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity var(--transition-speed) ease;
    /* Eye icon (closed by default) */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23555" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye-off"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.54 18.54 0 0 1 2.21-2.92m-.71-.71a10.07 10.07 0 0 1-1.34-1.34l-1.41-1.41"></path><path d="M2 2l20 20"></path><path d="M9.9 4.24A9.97 9.97 0 0 1 12 4c7 0 11 8 11 8a18.54 18.54 0 0 1-2.21 2.92"></path></svg>');
}

.toggle-password.active {
    opacity: 1;
    /* Eye icon (open) */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%233498db" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-eye"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>');
}


.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px; /* Space above button */
    font-size: 0.95rem;
    width: 100%;
}

.remember-me {
    display: flex;
    align-items: center;
    color: var(--color-white);
    opacity: 0.8;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    accent-color: var(--color-blue-dark); /* Color of the checkbox itself */
    cursor: pointer;
}

.remember-me label {
    cursor: pointer;
}

.forgot-password {
    color: var(--color-blue-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-speed) ease;
    opacity: 0.9;
}

.forgot-password:hover {
    color: var(--color-red);
    text-decoration: underline;
    opacity: 1;
}

#login-button {
    width: 100%;
    padding: 16px; /* More padding */
    background: linear-gradient(45deg, var(--color-blue-dark), #5DADE2); /* Gradient background */
    color: var(--color-white);
    border: none;
    border-radius: 12px; /* More rounded */
    font-size: 1.3rem; /* Larger font */
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* Stronger shadow */
    text-transform: uppercase; /* Uppercase text */
    letter-spacing: 1px;
}

#login-button:hover {
    background: linear-gradient(45deg, #5DADE2, var(--color-blue-dark)); /* Reverse gradient on hover */
    transform: translateY(-4px); /* Stronger lift */
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
}

#login-button:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.error-message {
    color: var(--color-red);
    margin-top: 20px;
    font-size: 1rem;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    box-shadow: var(--shadow-light);
}

/* Main Content (Landing Page) styles remain the same from previous step */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 2.5s;
    width: 100%;
    min-height: 100vh;
}

.hidden {
    display: none;
}

/* Header Section (Logo, Title, Subtitle container) */
.header-section {
    background-color: transparent;
    padding: 25px 35px;
    border-radius: var(--border-radius-base);
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    max-width: 550px;
    gap: 5px;
}

.header-top-logo {
    width: 180px;
    animation: float 3s ease-in-out infinite, pulse 2s infinite alternate;
    position: relative;
    z-index: 1;
}

/* Circular transparent background for the header logo */
.header-top-logo::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: -1;
}


/* Pulse Animation for Logo */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.03); opacity: 0.95; }
}

.main-title-container {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 18px;
    font-style: italic;
    letter-spacing: 1px;
    text-align: center;
}

.title-red {
    color: var(--color-red);
}

.title-blue {
    color: var(--color-blue-dark);
}

.subtitle-info {
    font-size: 1.3rem;
    color: var(--color-text-light);
    text-align: center;
    font-weight: 500;
    line-height: 1.4;
}

/* Marquee */
.marquee-container {
    width: 90%;
    max-width: 650px;
    background-color: transparent;
    padding: 12px 0;
    margin-bottom: 25px;
    border-radius: var(--border-radius-base);
    overflow: hidden;
    position: relative;
    height: 40px;
    text-align: left;
}

.marquee-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-red);
    white-space: nowrap;
    font-style: italic;
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% { left: 100%; }
    100% { left: -200%; }
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    width: 90%;
    max-width: 650px;
    margin-bottom: 40px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.98);
    padding: 25px;
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: bold;
    transition: all var(--transition-speed) cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.grid-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-strong);
    background-color: var(--color-white);
    border-color: var(--color-blue-light);
}

.grid-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 12px;
    color: var(--color-blue-dark);
    transition: color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.grid-item:hover .grid-icon {
    color: var(--color-red);
    transform: rotate(5deg) scale(1.1);
}

.grid-label {
    font-size: 1.25rem;
    text-align: center;
    font-weight: 600;
}

/* Logout Button */
#logout-button {
    padding: 15px 35px;
    background-color: var(--color-red);
    color: var(--color-white);
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform 0.2s ease, box-shadow var(--transition-speed) ease;
    margin-top: 50px;
    box-shadow: var(--shadow-medium);
}

#logout-button:hover {
    background-color: #bb2d3b;
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

/* Footer */
.footer {
    width: 100%;
    padding: 20px 10px;
    margin-top: 30px;
    color: rgba(var(--color-text-dark), 0.8);
    font-size: 0.95rem;
    text-align: center;
    background: rgba(var(--color-white), 0.8);
    border-top-left-radius: var(--border-radius-base);
    border-top-right-radius: var(--border-radius-base);
    box-shadow: 0 -6px 15px rgba(0,0,0,0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Animations */
@keyframes zoomIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .login-container, .header-section, .marquee-container, .feature-grid {
        padding: 18px;
    }
    .login-logo {
        width: 100px;
        margin-bottom: 20px;
    }
    .login-container h2 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    .input-group input {
        padding: 12px 12px 12px 40px;
        font-size: 1rem;
    }
    .input-icon, .toggle-password {
        width: 20px;
        height: 20px;
        left: 12px;
    }
    .toggle-password {
        right: 12px;
    }
    .options-row {
        margin-bottom: 20px;
        font-size: 0.85rem;
    }
    #login-button {
        padding: 14px;
        font-size: 1.1rem;
    }

    .header-top-logo {
        width: 150px;
    }
    .header-top-logo::before {
        width: 180px; /* Adjust pseudo-element size for responsive */
        height: 180px;
    }
    .main-title-container {
        font-size: 2.5rem;
        gap: 15px;
    }
    .subtitle-info {
        font-size: 1.1rem;
    }
    .marquee-text {
        font-size: 1.1rem;
        animation-duration: 20s;
    }
    .grid-icon {
        width: 50px;
        height: 50px;
    }
    .grid-label {
        font-size: 1.15rem;
    }
    #logout-button {
        font-size: 1.1rem;
        padding: 12px 30px;
    }
    .footer {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-container, .header-section, .marquee-container, .feature-grid {
        padding: 15px;
    }
    .login-logo {
        width: 80px;
        margin-bottom: 15px;
    }
    .login-container h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    .input-group input {
        padding: 10px 10px 10px 35px;
        font-size: 0.95rem;
    }
     .input-icon, .toggle-password {
        width: 18px;
        height: 18px;
        left: 10px;
    }
    .toggle-password {
        right: 10px;
    }
    .options-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
        gap: 10px;
    }
    .forgot-password {
        align-self: flex-end;
    }
    #login-button {
        padding: 12px;
        font-size: 1.05rem;
    }

    .header-top-logo {
        width: 120px;
    }
     .header-top-logo::before {
        width: 150px;
        height: 150px;
    }
    .main-title-container {
        font-size: 2rem;
        gap: 10px;
    }
    .subtitle-info {
        font-size: 0.9rem;
    }
    .marquee-text {
        font-size: 1rem;
        animation-duration: 18s;
    }
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .grid-icon {
        width: 40px;
        height: 40px;
    }
    .grid-label {
        font-size: 1.05rem;
    }
    #logout-button {
        font-size: 1rem;
        padding: 10px 25px;
    }
    .footer {
        font-size: 0.85rem;
    }
}