/* Base Styles & Typography */
:root {
    --primary-color: #c48cb3;
    --secondary-color: #724068;
    --text-color: #1e293b;
    --glass-bg: rgba(255, 255, 255, 0.3);
    --glass-border: rgba(255, 255, 255, 0.5);
}

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

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8fafc;
}

/* Background Image Animation */
.bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: url('bg.jpg') no-repeat center center;
    background-size: cover;
    animation: zoomInOut 10s alternate infinite ease-in-out;
}

@keyframes zoomInOut {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Main Content Styles */
#main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    animation: slideUpFade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #475569;
}

/* Inline Loader */
#inline-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    height: 100px; /* reserve space so card doesn't jump drastically */
    justify-content: center;
}

.elegant-spinner {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    animation: elegantSpin 1.5s linear infinite;
    position: relative;
    margin: 1rem 0;
}

.elegant-spinner::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--secondary-color);
    border-bottom-color: var(--primary-color);
    animation: elegantSpin 1s linear infinite reverse;
}

@keyframes elegantSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#inline-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Button */
.hidden {
    display: none !important;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 20px -10px rgba(99, 102, 241, 0.5);
    opacity: 0;
    margin-top: -100px; /* offset the reserved space */
}

.cta-button.fade-in {
    animation: fadeIn 0.5s ease forwards;
    margin-top: 0; /* reset margin when showing */
}

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

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -10px rgba(99, 102, 241, 0.7);
}

.cta-button:active {
    transform: translateY(1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .glass-card {
        padding: 2rem;
    }
    .title {
        font-size: 1.8rem;
    }
    .subtitle {
        font-size: 1rem;
    }
    .logo {
        max-width: 120px;
    }
}
