/* ================= RESET ================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", sans-serif;
}

body {
    min-height: 100dvh;
    background: url("/assets/SameeraWallpaper.png") no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* ================= OVERLAY ================= */

.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
}

/* ================= MAIN WRAPPER ================= */

.login-wrapper {
    position: relative;
    z-index: 2;
    width: 900px;
    height: 500px;
    max-width: 95%;
    display: flex;
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

/* ================= LOGIN CARD ================= */

.login-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
}

.login-card h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 25px;
    color: rgba(255,255,255,0.85);
}

/* Inputs */

.login-card input {
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.15);
    color: white;
}

.login-card input:focus {
    background: rgba(255,255,255,0.3);
    border: 1px solid #C62828;
    box-shadow: 0 0 10px rgba(198,40,40,0.4);
}

/* Button */

.login-card button {
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #C62828, #E53935);
    color: white;
    cursor: pointer;
}

/* ================= IMAGE SECTION ================= */

.image-section {
    flex: 1;
    background: url("/assets/HavenCrestVilla.jpeg") no-repeat center/cover;
    position: relative;
}

.image-overlay {
    position: absolute;
    width: 100%;
    height: 100%;

    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0.45),
        rgba(0,0,0,0.2)
    );

    display: flex;

    /*  premium positioning */
    align-items: flex-start;
    justify-content: flex-start;

    padding-top: 5px;
    padding-left: 58px;
}

.brand-text {
    text-align: center;
    max-width: 400px;
}

.brand-text h1 {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: 8px;

    background: linear-gradient(90deg, #ffffff, #facc15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.brand-text p {
    margin-top: 12px;
    font-size: 14px;
    letter-spacing: 5px;
    color: rgba(255,255,255,0.9);
}
/* ================= ERROR + LOADER ================= */

.error-msg {
    color: #ff4d4d;
    margin-top: 10px;
    text-align: center;
}

.loader {
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.shake {
    animation: shake 0.3s;
}

@keyframes shake {
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
}

/* ================= ULTRA PREMIUM INTRO ================= */

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

/* Glow */
#intro::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(196,30,30,0.2), transparent);
    filter: blur(100px);
    animation: glow 4s infinite;
}

@keyframes glow {
    50% { transform: scale(1.2); }
}

/* Logo */

.logo-reveal {
    text-align: center;
    opacity: 0;
    animation: fadeIn 2s forwards;
}

.logo-reveal h1 {
    font-size: 46px;
    letter-spacing: 8px;
    background: linear-gradient(90deg, #fff, #facc15);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* TAGLINE FIXED */

.logo-reveal p {
    margin-top: 10px;
    color: #aaa;
    opacity: 0;
    animation: showTagline 1.5s forwards;
    animation-delay: 1.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* IMPORTANT FIX */

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

/* EXIT */

#intro.hide {
    opacity: 0;
    transition: 1s;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

    .login-wrapper {
        flex-direction: column;
        height: auto;
    }

    .image-section {
        height: 200px;
    }

    .brand-text h1 {
        font-size: 28px;
    }
}

.brand-text {
    animation: fadeInBrand 1.5s ease;
}

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

.login-title {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 10px;

    /* Sameera gold gradient */

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

.login-title {
    animation: loginFade 1s ease;
}

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

.brand-small {
    font-size: 14px;
    letter-spacing: 6px;
    margin-bottom: 8px;

    color: rgba(255,255,255,0.6);
}

.portal-title {
    font-size: 30px;
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 10px;

    color: #C62828;

    text-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.welcome-text {
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 25px;
    color: rgba(255,255,255,0.85);
}

.portal-title {
    animation: portalFade 1s ease;
}

@keyframes portalFade {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-title {
    line-height: 2;
}

.login-card input::placeholder {
    color: rgba(255, 255, 255, 0.607);
}

.main-logo {
    width: 240px;
    max-width: 80%;
    margin-bottom: 10px;
    filter: drop-shadow(0 8px 25px rgba(0,0,0,0.4));
}

.logo-circle {
    width: 160px;
    height: 160px;
    background: #ffffff;
    border-radius: 50%;

    display: flex;
    justify-content: center;
    align-items: center;

    box-shadow: 
        0 10px 40px rgba(0,0,0,0.4),
        0 0 25px rgba(255,255,255,0.08);

    position: relative;
}

.main-logo {
    width: 110px;
    height: auto;
}

.logo-circle::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;

    border: 3px solid rgba(255,255,255,0.15);
    border-top: 3px solid #C62828;

    animation: spin 2s linear infinite;
}

.logo-circle {
    animation: popIn 1.2s ease;
}

@keyframes popIn {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}
