/* ===== Thai-Inspired Custom CSS for Pulse App ===== */

/* Import Google Font - Noto Sans Thai */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

/* Custom CSS Variables */
:root {
    --thai-primary: #7c3aed; /* Violet-600 */
    --thai-secondary: #f97316; /* Orange-500 */
    --thai-accent: #14b8a6; /* Teal-500 */
    --thai-gold: #fbbf24; /* Amber-400 */
    --thai-danger: #ef4444; /* Red-500 */
    --thai-warning: #f59e0b; /* Amber-500 */
    --thai-success: #10b981; /* Emerald-500 */
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

/* Dark mode variables */
[data-theme="dark"] {
    --glass-bg: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
}

/* Base Styles */
* {
    font-family: 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--thai-primary);
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--thai-accent);
}

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

/* Animated Gradient Background */
.animated-gradient {
    background: linear-gradient(270deg, var(--thai-primary), var(--thai-secondary), var(--thai-accent));
    background-size: 600% 600%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Pulse Animation for Vital Rings */
@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.vital-pulse {
    animation: pulseRing 2s infinite;
}

/* Floating Animation for Icons */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

.float-icon {
    animation: float 3s ease-in-out infinite;
}

/* Thai-specific Text Styling */
.thai-headline {
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.thai-body {
    line-height: 1.6;
}

/* Status Badge Colors */
.status-safe {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.status-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.status-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

/* Button Hover Effects */
.btn-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Insight Card Variants */
.insight-card-info {
    border-left: 4px solid var(--thai-accent);
}

.insight-card-warning {
    border-left: 4px solid var(--thai-warning);
}

.insight-card-danger {
    border-left: 4px solid var(--thai-danger);
}

/* Progress Ring Animation */
.progress-ring {
    transition: stroke-dashoffset 0.5s ease-in-out;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
}

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

/* Responsive Typography */
@media (max-width: 640px) {
    .thai-headline {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .vital-ring {
        width: 5rem;
        height: 5rem;
    }
    
    .vital-ring .text-2xl {
        font-size: 1.25rem;
    }
}

/* Desktop Enhancements */
@media (min-width: 1024px) {
    main {
        max-width: 1200px;
        margin: 0 auto;
        padding-top: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--thai-accent);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .glass-card {
        background: white !important;
        border: 1px solid #ddd !important;
    }
}