:root {
    /* Color Palette - Modern, vibrant yet professional */
    --primary-color: #4f46e5;
    /* Indigo */
    --primary-hover: #4338ca;
    --primary-light: rgba(79, 70, 229, 0.1);

    --secondary-color: #ffffff;
    --secondary-hover: #f8fafc;

    --bg-color: #f1f5f9;
    /* Slate 100 */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #475569;
    /* Slate 600 */
    --text-light: #94a3b8;
    /* Slate 400 */

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Shapes Colors */
    --shape-1: #c7d2fe;
    /* Indigo 200 */
    --shape-2: #ddd6fe;
    /* Violet 200 */
    --shape-3: #e0e7ff;
    /* Indigo 100 */
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f172a;
        /* Slate 900 */
        --text-main: #f8fafc;
        /* Slate 50 */
        --text-muted: #cbd5e1;
        /* Slate 300 */

        --glass-bg: rgba(30, 41, 59, 0.7);
        --glass-border: rgba(255, 255, 255, 0.1);
        --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);

        --secondary-color: rgba(255, 255, 255, 0.05);
        --secondary-hover: rgba(255, 255, 255, 0.1);

        --shape-1: #312e81;
        /* Indigo 900 */
        --shape-2: #4c1d95;
        /* Violet 900 */
        --shape-3: #1e1b4b;
        /* Indigo 950 */
    }
}

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

body {
    font-family: 'Sarabun', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Background Animated Shapes */
.bg-shape {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    animation: float 20s infinite alternate;
}

.shape-1 {
    width: 40vw;
    height: 40vw;
    background: var(--shape-1);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 35vw;
    height: 35vw;
    background: var(--shape-2);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.shape-3 {
    width: 30vw;
    height: 30vw;
    background: var(--shape-3);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 10%) scale(1.1);
    }

    100% {
        transform: translate(-5%, -5%) scale(0.9);
    }
}

/* Layout */
.welcome-wrapper {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    z-index: 1;
}

/* 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: 2rem;
    padding: 3rem 2.5rem;
    box-shadow: var(--glass-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Card highlight effect */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: shine 6s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* Header */
.card-header {
    margin-bottom: 2.5rem;
}

.logo-container {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem;
    background: #ffffff;
    border-radius: 50%;
    padding: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--primary-light);
}

.school-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    font-size: 3rem;
    color: var(--primary-color);
}

.school-title {
    margin-bottom: 1rem;
    line-height: 1.2;
}

.title-prefix {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-muted);
}

.title-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.school-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    font-weight: 400;
}

/* Buttons */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    border-color: var(--text-muted);
}

@media (prefers-color-scheme: dark) {
    .btn-secondary {
        border-color: rgba(255, 255, 255, 0.2);
    }
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* Footer */
.card-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.copyright {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Animation Delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* Icon hover animation */
.btn:hover .btn-icon i {
    animation: bounceRight 0.5s ease-in-out infinite alternate;
}

@keyframes bounceRight {
    from { transform: translateX(0); }
    to { transform: translateX(5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Responsive Adjustments */
@media screen and (max-width: 480px) {
    .welcome-wrapper {
        padding: 1rem;
    }

    .glass-card {
        padding: 2.5rem 1.5rem;
        border-radius: 1.5rem;
    }

    .title-main {
        font-size: 1.75rem;
    }

    .school-subtitle {
        font-size: 0.95rem;
    }

    .logo-container {
        width: 90px;
        height: 90px;
    }
}