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

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* card micro-entrance */
.feature-card {
    transform-origin: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(40, 167, 69, 0.3);
}

.feature-card[data-anim] {
    animation: cardPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardPop {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

/* General Animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-fade-in-up {
    animation: slideUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    /* Ensure hidden before start */
}

.animate-float {
    animation: bgPulse 6s ease-in-out infinite;
    /* using bgPulse as float for now or define float */
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glassmorphism */
/* Glassmorphism */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

/* Site background layer (uses base.html .bg-image-layer element) */
/* Removed conflicting opacity */

/* Interactive glow (smaller radius) */
:root {
    --interactive-radius: 8px;
}

.interactive-bg {
    z-index: -2;
    pointer-events: none;
}

/* Footer improvements */
footer {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.85));
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 2.2rem 1.2rem;
    text-align: center;
    margin-top: auto;
}

.visitor-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.9rem 1.2rem;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 1.05rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0.8rem;
}

.visitor-counter .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 4px;
    font-weight: 500
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .bg-image-layer {
        opacity: 0.24;
        filter: blur(4px);
    }

    footer {
        padding: 1.4rem 1rem;
    }

    .visitor-counter {
        font-size: 0.95rem;
        padding: 0.6rem 0.9rem;
    }
}

/* Helper classes moved from templates to remove inline styles */
.glow-bg.hidden {
    display: none;
}

.brand-subtitle {
    font-size: 0.8em;
    color: var(--text-muted);
}

.inline-form {
    display: inline;
}

.logout-button {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.login-btn {
    padding: 0.5rem 1.5rem;
}

/* Index / content helpers */
.section-spaced {
    margin-top: 4rem;
}

.centered-h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.resource-link {
    text-decoration: none;
    color: inherit;
}

.push-right {
    margin-left: auto;
}

/* GPA modal helpers */
.modal-footer {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.course-name {
    width: 100%;
}

.credits-input {
    width: 80px;
}

.grade-select {
    width: 120px;
}

/* GPA modal visuals */
.gpa-result-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.gpa-number {
    font-weight: 700;
}