@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --arctic-400: #38bdf8;
    --arctic-500: #0ea5e9;
    --glacier-400: #2dd4bf;
    --glacier-500: #14b8a6;
    --frost-800: #1e293b;
    --frost-900: #0f172a;
}

body {
    font-family: 'Inter', sans-serif;
}

.gradient-text {
    background: linear-gradient(135deg, var(--arctic-400), var(--glacier-400), #a5f3fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card-glow {
    box-shadow: 
        0 0 20px rgba(56, 189, 248, 0.1),
        0 0 40px rgba(45, 212, 191, 0.05);
}

.pulse-slow {
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.fade-in {
    animation: fadeIn 1.2s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Snowflake styles for animation */
.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1em;
    user-select: none;
    pointer-events: none;
    animation-name: fall;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes fall {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--frost-900);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--arctic-500), var(--glacier-500));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--arctic-400), var(--glacier-400));
}

/* Selection colors */
::selection {
    background: rgba(56, 189, 248, 0.3);
}

::-moz-selection {
    background: rgba(56, 189, 248, 0.3);
}

/* News Feed Animations */
.news-item {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.news-item:nth-child(1) { animation-delay: 0.1s; }
.news-item:nth-child(2) { animation-delay: 0.2s; }
.news-item:nth-child(3) { animation-delay: 0.3s; }
.news-item:nth-child(4) { animation-delay: 0.4s; }
.news-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-badge {
    transition: all 0.3s ease;
}

.news-item:hover .news-badge {
    transform: scale(1.05);
}

/* Live pulse animation for connection status */
@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.text-green-400 {
    animation: pulse-live 2s ease-in-out infinite;
}

/* Warning Section Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.warning-shake {
    animation: shake 0.5s ease-in-out;
}

/* Gradient pulse for warning boxes */
@keyframes warning-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.3); }
    50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.6); }
}

.bg-red-900\\/20 {
    animation: warning-pulse 4s ease-in-out infinite;
}

/* Hover effects for warning cards */
.bg-red-900\\/20:hover,
.bg-orange-900\\/20:hover,
.bg-amber-900\\/20:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Emergency numbers styling */
.fa-phone, .fa-satellite-dish, .fa-car-battery {
    transition: all 0.3s ease;
}

.fa-phone:hover { color: #f59e0b !important; transform: scale(1.1); }
.fa-satellite-dish:hover { color: #60a5fa !important; transform: scale(1.1); }
.fa-car-battery:hover { color: #10b981 !important; transform: scale(1.1); }

/* Road Signs Specific Animations */
@keyframes float-sign {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.w-16.h-16 {
    transition: all 0.3s ease;
}

.bg-frost-700\\/30.rounded-xl:hover .w-16.h-16 {
    animation: float-sign 2s ease-in-out infinite;
}

/* Depth gauge animations */
.bg-blue-800\\/30, .bg-amber-800\\/30, .bg-red-800\\/30 {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bg-blue-800\\/30::before, .bg-amber-800\\/30::before, .bg-red-800\\/30::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.bg-blue-800\\/30:hover::before, .bg-amber-800\\/30:hover::before, .bg-red-800\\/30:hover::before {
    left: 100%;
}

/* Color-specific hover effects */
.bg-blue-800\\/30:hover { border-color: rgba(59, 130, 246, 0.5) !important; }
.bg-amber-800\\/30:hover { border-color: rgba(245, 158, 11, 0.5) !important; }
.bg-red-800\\/30:hover { border-color: rgba(239, 68, 68, 0.5) !important; }

/* Legal consequences highlight */
.bg-red-900\\/20:hover {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.4);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Golden rule box animation */
.bg-gradient-to-r.from-amber-900\\/30.to-orange-900\\/30 {
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-r.from-amber-900\\/30.to-orange-900\\/30::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* White Markers Specific Animations */
@keyframes cross-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.bg-white.rounded-lg {
    animation: cross-pulse 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* Memorial box specific styles */
.bg-red-900\\/20.rounded-xl {
    position: relative;
    overflow: hidden;
}

.bg-red-900\\/20.rounded-xl::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.bg-red-900\\/20.rounded-xl:hover::before {
    left: 100%;
}

/* Memorial icon animations */
.fa-cross, .fa-skull, .fa-car-crash, .fa-exclamation, .fa-snowflake, .fa-eye, .fa-hands, .fa-road, .fa-monument {
    transition: all 0.3s ease;
}

.fa-cross:hover, .fa-skull:hover, .fa-car-crash:hover, .fa-exclamation:hover {
    transform: scale(1.3);
    color: #dc2626 !important;
}

.fa-snowflake:hover, .fa-eye:hover, .fa-hands:hover, .fa-road:hover {
    transform: scale(1.3);
    color: #3b82f6 !important;
}

.fa-monument:hover {
    transform: scale(1.3);
    color: #f59e0b !important;
}

/* Memorial text emphasis */
.text-red-200 strong {
    position: relative;
}

.text-red-200 strong::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ef4444, transparent);
    animation: underline-pulse 2s ease-in-out infinite;
}

@keyframes underline-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}