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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #222;
    background: linear-gradient(135deg, #e9eafc 0%, #f7f9fb 100%);
    min-height: 100vh;
}

/* Login page styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-card h2 {
    color: #5562c1;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.login-card p {
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.google-login-container {
    margin: 2rem 0;
}

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 1.1rem;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.google-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(85, 98, 193, 0.3);
}

.login-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.login-info p {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0;
}

.login-info a {
    color: #5562c1;
    text-decoration: none;
}

.login-info a:hover {
    text-decoration: underline;
}

/* Profile dropdown styles */
#profile-pic-container {
    position: relative;
}

#profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    object-fit: cover;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #f6f6f6;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    min-width: 180px;
    padding: 5px 0;
}

#profile-pic-container:hover .profile-dropdown {
    display: block;
}

.profile-dropdown a, .profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.profile-dropdown .menu-icon {
    display: inline-block;
    width: 18px;
    text-align: center;
    font-size: 1.1em;
    color: #555;
}

.profile-dropdown a:hover, .profile-dropdown button:hover {
    background-color: #f0f0f0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: #fff;
    color: #222;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #5562c1;
}

.nav-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #3730a3, #6b21a8);
    color: white;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-3px);
    text-decoration: none;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: #ffffff;
    color: #4f46e5;
    border: 2px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover, .btn-secondary:focus {
    background: #f8fafc;
    color: #3730a3;
    border-color: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    text-decoration: none;
}

.btn-active {
    background-color: #667eea;
    color: #fff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.12);
    cursor: default;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-active:hover {
    transform: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover, .btn-success:focus {
    background: linear-gradient(135deg, #047857, #065f46);
    color: white;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transform: translateY(-3px);
    text-decoration: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover, .btn-danger:focus {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-3px);
    text-decoration: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover, .btn-warning:focus {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    transform: translateY(-3px);
    text-decoration: none;
}

.main-content {
    background: #fff;
    color: #222;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1f2937;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: white;
    color: #374151;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card h3 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dbeafe;
    border-radius: 5px;
    font-size: 1rem;
    background: #f7f9fb;
    color: #222;
}

.exam-generator {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.question {
    background: #fff;
    border-left: 4px solid #5562c1;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.options {
    margin: 1rem 0;
}

.option {
    margin: 0.5rem 0;
}

.option input {
    margin-right: 0.5rem;
}

.results {
    background: #e6ffe6;
    color: #222;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.analytics-card {
    background: #f7f9fb;
    color: #222;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat {
    display: inline-block;
    margin: 0.5rem 1rem 0.5rem 0;
    padding: 0.5rem 1rem;
    background: #5562c1;
    color: #fff;
    border-radius: 20px;
    font-size: 0.9rem;
}

.leaderboard {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.rank {
    font-weight: bold;
    color: #667eea;
}

.hidden {
    display: none !important;
}

/* New styles for added sections */
.impact-showcase {
    text-align: center;
    margin-bottom: 4rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.impact-showcase h2,
.success-stories h2,
.upcoming-events h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1f2937;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.impact-card {
    background: white;
    color: #374151;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.impact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #34d399);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.impact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.12);
}

.impact-card:hover::before {
    opacity: 1;
}

.impact-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #34d399);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.75rem;
}

.impact-card p {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 500;
}

.success-stories,
.upcoming-events {
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03), rgba(118, 75, 162, 0.03));
    border: 1px solid rgba(102, 126, 234, 0.08);
}

.stories-grid,
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.story-card,
.event-card {
    background: white;
    color: #374151;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.story-card::before,
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover,
.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.story-card:hover::before,
.event-card:hover::before {
    opacity: 1;
}

.story-card h4,
.event-card h4 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.story-card p,
.event-card p {
    color: #6b7280;
    line-height: 1.6;
}

.subtopic-item {
    background: #f7f9fb; /* Light background for each item */
    color: #222;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.subtopic-item:hover {
    background-color: #e9eafc; /* Highlight on hover */
    transform: translateY(-3px);
}

/* Login/Register Grid */
.login-register-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Profile Page Grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Footer Styles - Full Width, Consistent with Header */
.footer {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #374151;
    padding: 1rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-content p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

.footer-links a:hover {
    color: #4f46e5;
    background: rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

/* Footer Responsive Design */
@media (max-width: 768px) {
    .footer {
        padding: 0.75rem 0;
    }
    
    .footer-content {
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .footer-content p {
        font-size: 0.8rem;
    }
    
    .footer-links {
        gap: 1rem;
        flex-direction: column;
    }
    
    .footer-links a {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

/* Teacher Portal Styles */
.teacher-portal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.image-preview {
    margin-top: 10px;
    display: none;
}

.preview-img {
    max-width: 300px;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.remove-image-btn {
    display: block;
    margin-top: 5px;
}

.review-actions {
    margin-top: 1rem;
}

.question-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.question-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.question-details {
    flex-grow: 1;
}

.question-meta {
    text-align: right;
    min-width: 120px;
    flex-shrink: 0;
}

.question-meta .stat { margin-bottom: 0.5rem; }
.status-approved { background-color: #38b000; color: #fff; }
.status-pending { background-color: #ffb703; color: #222; }
.status-rejected { background-color: #e63946; color: #fff; }
.views-stat { background-color: #2196f3; color: #fff; }

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .hero {
        padding: 2rem 1rem;
        margin-bottom: 3rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .impact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stories-grid,
    .events-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .success-stories,
    .upcoming-events {
        padding: 1.5rem 1rem;
        margin-bottom: 2rem;
    }
    
    .success-stories h2,
    .upcoming-events h2,
    .impact-showcase h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .login-register-grid {
        grid-template-columns: 1fr;
    }

    .teacher-portal-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .impact-showcase {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
}

/* ===== MODERN LOADING STATES & SPINNERS ===== */
/* Teen-friendly, beautiful loading animations */

/* Main Loading Container */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
}

/* Primary Spinner */
.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}

.main-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(37, 99, 235, 0.1);
    border-left: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pulse-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.8);
        opacity: 1;
    }
}

/* Loading Text Styles */
.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    text-align: center;
}

.loading-subtext {
    font-size: 0.9rem;
    color: #6b7280;
    opacity: 0.8;
    text-align: center;
}

/* Card-level Loading Spinner */
.card-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    border-left: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Skeleton Loading for Cards */
.skeleton-card {
    width: 100%;
    height: 180px;
    border-radius: 15px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    opacity: 0.7;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Animated Loading Dots */
.loading-dots {
    display: inline-flex;
    gap: 0.2rem;
    margin-left: 0.5rem;
    align-items: center;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Success Animation */
.success-checkmark {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.success-checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

/* Modern Button Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
    cursor: not-allowed;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left: 2px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Progress Loading Bar */
.progress-loading-bar {
    width: 100%;
    height: 4px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-loading-bar::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 2px;
    animation: progress-slide 2s ease-in-out infinite;
}

@keyframes progress-slide {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(250%);
    }
    100% {
        transform: translateX(350%);
    }
}

/* Floating Loading Elements */
.floating-loader {
    position: relative;
    display: inline-block;
    margin: 1rem 0;
}

.floating-loader span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    margin: 0 2px;
    animation: floating-bounce 1.4s ease-in-out infinite both;
}

.floating-loader span:nth-child(1) { animation-delay: -0.32s; }
.floating-loader span:nth-child(2) { animation-delay: -0.16s; }
.floating-loader span:nth-child(3) { animation-delay: 0s; }
.floating-loader span:nth-child(4) { animation-delay: 0.16s; }
.floating-loader span:nth-child(5) { animation-delay: 0.32s; }

@keyframes floating-bounce {
    0%, 80%, 100% {
        transform: scale(0.8) translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2) translateY(-10px);
        opacity: 1;
    }
}

/* Shimmer Loading Effect */
.shimmer-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Responsive Loading States */
@media (max-width: 768px) {
    .spinner-container {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .main-spinner {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }
    
    .pulse-ring {
        top: -8px;
        left: -8px;
        width: 76px;
        height: 76px;
    }
    
    .loading-container {
        padding: 3rem 1rem;
    }
    
    .loading-text {
        font-size: 1rem;
    }
}