/**
 * The ChitraHarsha VPK VishwaGranthalaya
 * Custom Styles
 * Version: 5.0.0
 * License: MIT
 */

:root {
    --neon-cyan: #06b6d4;
    --neon-purple: #a855f7;
    --glass-bg: rgba(5, 5, 10, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    color: #e5e7eb;
    overflow-x: hidden;
}

/* Futuristic Scrollbar */
::-webkit-scrollbar { 
    width: 6px; 
}

::-webkit-scrollbar-track { 
    background: #000; 
}

::-webkit-scrollbar-thumb { 
    background: var(--neon-cyan); 
    border-radius: 10px; 
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--glass-border);
}

.glass-panel {
    background: rgba(15, 15, 20, 0.7);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(6, 182, 212, 0.15);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Animations */
@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(6, 182, 212, 0.2); 
    }
    50% { 
        box-shadow: 0 0 30px rgba(6, 182, 212, 0.5); 
    }
}

.animate-glow { 
    animation: pulse-glow 3s infinite; 
}

@keyframes float {
    0% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-10px); 
    }
    100% { 
        transform: translateY(0px); 
    }
}

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

@keyframes slide-in-right {
    from { 
        transform: translateX(100%); 
    }
    to { 
        transform: translateX(0); 
    }
}

.slide-in { 
    animation: slide-in-right 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}

/* Utility Classes */
.gradient-text {
    background: linear-gradient(to right, #ffffff, #06b6d4, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.input-field {
    width: 100%;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(75, 85, 99, 0.5);
    padding: 1rem;
    border-radius: 0.75rem;
    color: white;
    outline: none;
    transition: all 0.3s ease;
}

.input-field:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 15px rgba(6,182,212,0.2);
}

.input-field::placeholder {
    color: rgba(156, 163, 175, 0.7);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(to right, #06b6d4, #3b82f6);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
    background: rgba(75, 85, 99, 0.5);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(75, 85, 99, 0.5);
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(75, 85, 99, 0.7);
    border-color: #06b6d4;
}

/* Navigation Styles */
.nav-btn {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #06b6d4;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-btn:hover::after {
    width: 100%;
}

/* Card Styles */
.feature-card {
    background: rgba(15, 15, 20, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(6, 182, 212, 0.3);
    border-top: 4px solid #06b6d4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(15, 15, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    color: white;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: rgba(34, 197, 94, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

/* Three.js Canvas Styles */
#three-canvas-container canvas {
    border-radius: 1rem;
    max-width: 100%;
    height: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .input-field {
        padding: 0.75rem;
    }
    
    .glass-panel {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gradient-text {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .glass-panel {
        margin: 0.5rem;
        padding: 1rem;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .animate-float,
    .animate-glow,
    .slide-in,
    .animate-fade-in {
        animation: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .btn-primary:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .glass,
    .glass-panel {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid #06b6d4;
    }
    
    .input-field {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid #06b6d4;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .glass,
    .glass-panel {
        background: white;
        border: 1px solid black;
    }
    
    .gradient-text {
        -webkit-text-fill-color: black;
        background: none;
    }
}