@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    -webkit-tap-highlight-color: transparent;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    touch-action: manipulation;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button, a {
    touch-action: manipulation;
}

@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.bar-clear {
    background: linear-gradient(90deg, rgba(165,243,252,1) 0%, rgba(125,211,252,1) 100%);
}

.bar-cloudy {
    background: linear-gradient(90deg, rgba(243,244,246,1) 0%, rgba(209,213,219,1) 100%);
}

.bar-amber {
    background: linear-gradient(90deg, rgba(245,158,11,1) 0%, rgba(217,119,6,1) 100%);
}

.mold-alert {
    color: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loader {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(16, 185, 129, 0.2);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#dropzone {
    transition: all 0.3s ease;
}

#dropzone.dragover {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    transform: scale(1.01);
}

#dropzone:hover {
    border-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

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

input[type="file"] {
    color: #9ca3af;
}

select {
    cursor: pointer;
}

button {
    transition: all 0.2s ease;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:active:not(:disabled) {
    transform: scale(0.97);
}

button:hover:not(:disabled) {
    transform: translateY(-1px);
}

a {
    transition: all 0.2s ease;
}

video {
    max-height: 200px;
    object-fit: contain;
}

@media (max-width: 640px) {
    video {
        max-height: 160px;
    }
}

.bg-gradient-to-r {
    transition: all 0.2s ease;
}

table {
    border-collapse: collapse;
}

th, td {
    text-align: left;
}

.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
}

#tipText {
    transition: opacity 0.3s ease;
}

.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.glass-panel {
    background: rgba(31, 41, 55, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(75, 85, 99, 0.3);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(16, 185, 129, 0.2);
}

.report-row, .report-card {
    transition: all 0.2s ease;
}

.report-row:hover {
    background-color: rgba(55, 65, 81, 0.5);
}

.report-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.3);
}

input, select, textarea {
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.timeline-step {
    transition: all 0.3s ease;
}

.timeline-step.active {
    transform: scale(1.1);
}

.progress-bar {
    transition: width 0.5s ease-out;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

.text-gradient {
    background: linear-gradient(135deg, #10b981 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

img {
    transition: all 0.3s ease;
}

img:hover {
    opacity: 0.95;
}

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

@keyframes pulse-slow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.filter-btn {
    transition: all 0.2s ease;
}

.filter-btn:hover {
    transform: translateY(-1px);
}

.filter-btn.active {
    box-shadow: 0 4px 12px -2px rgba(16, 185, 129, 0.4);
}

.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(16, 185, 129, 0.4);
}

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

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

.animate-bounce-subtle {
    animation: bounceSubtle 2s ease-in-out infinite;
}

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

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }
    to { box-shadow: 0 0 30px rgba(16, 185, 129, 0.4); }
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.3);
}

.btn-pulse {
    position: relative;
    overflow: hidden;
}

.btn-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

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

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

@keyframes trichome-pulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.1); }
}

.animate-trichome-pulse {
    animation: trichome-pulse 2s ease-in-out infinite;
}

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

@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1rem; }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}
