/* Animated Background System for All Pages */

/* Base Animated Background - ENABLED */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    animation: gradientShift 15s ease-in-out infinite;
    overflow: hidden;
}

.animated-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

.animated-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

/* Particles System - DISABLED */
.particles {
    display: none;
}

.particle {
    display: none;
}

/* Geometric Shapes - DISABLED */
.geometric-shapes {
    display: none;
}

.shape {
    display: none;
}

.shape:nth-child(1) {
    top: 20%;
    left: 10%;
    border-radius: 0;
    transform: rotate(45deg);
}

.shape:nth-child(2) {
    top: 60%;
    right: 15%;
    width: 40px;
    height: 40px;
}

.shape:nth-child(3) {
    bottom: 20%;
    left: 20%;
    width: 80px;
    height: 80px;
    border-radius: 0;
    transform: rotate(30deg);
}

/* Floating Elements - DISABLED */
.floating-elements {
    display: none;
}

.floating-book {
    display: none;
}

.floating-book::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 0 rgba(255, 255, 255, 0.2),
                0 16px 0 rgba(255, 255, 255, 0.1),
                0 24px 0 rgba(255, 255, 255, 0.1);
}

.floating-document {
    display: none;
}

.floating-document::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 6px 0 rgba(255, 255, 255, 0.3),
                0 12px 0 rgba(255, 255, 255, 0.2),
                0 18px 0 rgba(255, 255, 255, 0.1),
                0 24px 0 rgba(255, 255, 255, 0.1);
}

.floating-pen {
    display: none;
}

.floating-pen::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -1px;
    width: 5px;
    height: 3px;
    background: #FFD700;
    border-radius: 50%;
}

/* Water Ripple Effects - ENABLED */
.water-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
    z-index: 2;
    animation: ripple 1.2s ease-out;
    transform: translate(-50%, -50%);
}

.water-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: rippleInner 2s ease-out;
    transform: translate(-50%, -50%);
}

/* Keyframe Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

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

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes gradientShift {
    0% { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); }
    25% { background: linear-gradient(135deg, #764ba2 0%, #f093fb 50%, #667eea 100%); }
    50% { background: linear-gradient(135deg, #f093fb 0%, #667eea 50%, #764ba2 100%); }
    75% { background: linear-gradient(135deg, #667eea 0%, #f093fb 50%, #764ba2 100%); }
    100% { background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

@keyframes floatBook {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) translateX(0px); 
        opacity: 0.6; 
    }
    25% { 
        transform: translateY(-30px) rotate(5deg) translateX(10px); 
        opacity: 0.8; 
    }
    50% { 
        transform: translateY(-60px) rotate(-3deg) translateX(-5px); 
        opacity: 0.7; 
    }
    75% { 
        transform: translateY(-30px) rotate(2deg) translateX(15px); 
        opacity: 0.9; 
    }
}

@keyframes floatDocument {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) translateX(0px); 
        opacity: 0.5; 
    }
    33% { 
        transform: translateY(-40px) rotate(-8deg) translateX(-10px); 
        opacity: 0.8; 
    }
    66% { 
        transform: translateY(-20px) rotate(6deg) translateX(8px); 
        opacity: 0.6; 
    }
}

@keyframes floatPen {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) translateX(0px); 
        opacity: 0.7; 
    }
    20% { 
        transform: translateY(-25px) rotate(15deg) translateX(5px); 
        opacity: 0.9; 
    }
    40% { 
        transform: translateY(-50px) rotate(-10deg) translateX(-8px); 
        opacity: 0.8; 
    }
    60% { 
        transform: translateY(-30px) rotate(8deg) translateX(12px); 
        opacity: 0.6; 
    }
    80% { 
        transform: translateY(-10px) rotate(-5deg) translateX(-3px); 
        opacity: 0.7; 
    }
}

@keyframes ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

@keyframes rippleInner {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Enhanced body styles for clean background */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Ensure interactive elements are above animated background */
a, button, input, select, textarea, .btn, .card, .feature, .admin-card, 
.nav-link, .mobile-nav-link, .logo, .user-info, .admin-header, 
.admin-sidebar, .admin-content, .login-container, .form-group, 
.form-control, .table, .modal, .dropdown, .tooltip {
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* Ensure animated elements don't interfere with interactive elements */
.floating-book, .floating-document, .floating-pen {
    pointer-events: none;
    z-index: 1;
}

/* Enhanced sections with better contrast */
.features, .section, .admin-content, .login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    margin: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card, .content-card, .stat-card, .action-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

.feature-card:hover, .action-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Enhanced navigation */
.navbar {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced footer */
footer {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* Admin specific styles */
.admin-container {
    background: transparent;
}

.admin-sidebar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.admin-main {
    background: transparent;
}

/* Login page specific */
.login-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Responsive Design for Mobile and Tablet */
@media (max-width: 768px) {
    .features, .section, .admin-content, .login-container {
        margin: 1rem 0.5rem;
        padding: 3rem 0;
    }
    
    .feature-card, .content-card, .stat-card, .action-btn {
        padding: 1.5rem;
        margin: 0.5rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Reduce floating elements on mobile for better performance */
    .floating-book, .floating-document, .floating-pen {
        display: none;
    }
    
}

@media (max-width: 480px) {
    .features, .section, .admin-content, .login-container {
        margin: 0.5rem;
        padding: 2rem 0;
    }
    
    .feature-card, .content-card, .stat-card, .action-btn {
        padding: 1.25rem;
        margin: 0.25rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    .feature-title {
        font-size: 1.25rem;
    }
    
    .feature-description {
        font-size: 0.9rem;
    }
    
    /* Hide all floating elements on very small screens */
    .floating-elements {
        display: none;
    }
    
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .feature-card, .content-card, .stat-card, .action-btn {
        padding: 2rem;
    }
    
    /* Reduce floating elements on tablet */
    .floating-book:nth-child(n+4),
    .floating-document:nth-child(n+4),
    .floating-pen:nth-child(n+3) {
        display: none;
    }
}
