/* 
 * CERIA SUPER APPS - Main Stylesheet
 * PHP 7.3 Compatible
 */

html, body { 
    height: 100%; 
    margin: 0; 
    padding: 0; 
}

* { 
    box-sizing: border-box; 
}

.app-root {
    font-family: 'DM Sans', sans-serif;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

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

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

@keyframes orb1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(60px, -40px) scale(1.1); }
    66% { transform: translate(-30px, 30px) scale(0.95); }
}

@keyframes orb2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-50px, 50px) scale(0.9); }
    66% { transform: translate(40px, -20px) scale(1.05); }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Animation Classes */
.anim-fade-up {
    animation: fadeUp 0.7s ease-out both;
}

.anim-scale-in {
    animation: scaleIn 0.5s ease-out both;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
}

.card-hover:hover .card-glow {
    opacity: 1;
}

.card-glow {
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Shimmer Effect */
.hero-shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

/* Orb Animations */
.orb-1 { 
    animation: orb1 12s ease-in-out infinite; 
}

.orb-2 { 
    animation: orb2 15s ease-in-out infinite; 
}

/* Tag Pill */
.tag-pill {
    transition: all 0.25s ease;
}

.tag-pill:hover,
.tag-pill.active {
    transform: scale(1.05);
}

/* Icon Float */
.icon-float {
    animation: float 3s ease-in-out infinite;
}

/* Stagger Animations */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }
.stagger-9 { animation-delay: 0.45s; }

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f0fef0 100%);
    border-radius: 20px;
    padding: 32px;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(34,197,94,0.15);
    animation: modalSlideUp 0.4s ease;
    margin: auto;
}

/* Dashboard Styles */
.dashboard-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-right: 1px solid rgba(255,255,255,0.1);
    animation: slideInLeft 0.4s ease;
    z-index: 900;
}

.dashboard-main {
    margin-left: 280px;
    width: calc(100% - 280px);
    height: 100%;
}

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

::-webkit-scrollbar-track { 
    background: transparent; 
}

::-webkit-scrollbar-thumb { 
    background: rgba(16,185,129,0.3); 
    border-radius: 3px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: rgba(16,185,129,0.5); 
}

/* Responsive Styles */
@media (max-width: 768px) {
    .dashboard-sidebar {
        width: 240px;
    }
    
    .dashboard-main {
        margin-left: 240px;
        width: calc(100% - 240px);
    }
    
    .modal-content {
        padding: 24px;
        width: 95%;
    }
}

@media (max-width: 640px) {
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        animation: none;
    }
    
    .dashboard-main {
        margin-left: 0;
        width: 100%;
    }
    
    #dashboard-view {
        flex-direction: column;
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 1.5s infinite;
}