/* Teen-friendly color scheme and modern styling */
:root {
    --primary-color: #ff6b6b;
    --primary-dark: #ff5252;
    --secondary-color: #4ecdc4;
    --accent-color: #45b7d1;
    --success-color: #96ceb4;
    --warning-color: #ffeaa7;
    --danger-color: #fd79a8;
    --info-color: #74b9ff;
    --purple-color: #a29bfe;
    --pink-color: #fd79a8;
    --mint-color: #00b894;
    --light-bg: #f8fafc;
    --card-shadow: 0 15px 35px rgba(255, 107, 107, 0.15);
    --border-radius: 1.5rem;
    --gradient-primary: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 100%);
    --gradient-secondary: linear-gradient(135deg, #74b9ff 0%, #a29bfe 100%);
    --gradient-accent: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 107, 107, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(78, 205, 196, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(116, 185, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Container background */
.container {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border: none !important;
    box-shadow: var(--card-shadow);
    border-radius: var(--border-radius) !important;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(255, 107, 107, 0.2);
}

/* Form styling */
.form-control {
    border: 2px solid rgba(255, 107, 107, 0.2);
    transition: all 0.3s ease;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25);
    transform: scale(1.02);
    background: rgba(255, 255, 255, 1);
}

/* Button styling */
.btn {
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    text-transform: none;
    border-radius: var(--border-radius);
}

.btn-primary {
    background: var(--gradient-primary);
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 107, 107, 0.4);
    background: var(--gradient-secondary);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.3);
}

/* Safety tip cards */
.safety-tip-card {
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.safety-tip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: -1;
}

.safety-tip-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.safety-icon {
    transition: all 0.3s ease;
}

.safety-emoji {
    font-size: 3rem;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.safety-tip-card:hover .safety-emoji {
    transform: scale(1.2) rotate(5deg);
}

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

/* Hero illustration animation */
.hero-illustration svg {
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from {
        filter: drop-shadow(0 0 10px rgba(255, 107, 107, 0.3));
    }
    to {
        filter: drop-shadow(0 0 20px rgba(78, 205, 196, 0.5));
    }
}

/* Results styling */
.results-safe {
    background: linear-gradient(135deg, #96ceb4, #55efc4);
    border-left: 5px solid var(--success-color);
    color: white;
}

.results-warning {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    border-left: 5px solid var(--warning-color);
    color: white;
}

.results-danger {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    border-left: 5px solid var(--danger-color);
    color: white;
}

.results-safe h4,
.results-warning h4,
.results-danger h4 {
    color: white !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.results-safe p,
.results-warning p,
.results-danger p {
    color: white !important;
}

/* Map styling */
#map {
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    z-index: 1;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading animation */
.loading-pulse {
    animation: pulse 2s infinite;
}

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

/* History item styling */
.history-item {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

.history-item:hover {
    background-color: #f8fafc;
    transform: translateX(5px);
}

/* Accordion customization */
.accordion-button {
    background-color: transparent;
    border: none;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236366f1'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Color utilities */
.text-purple {
    color: var(--purple-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-5 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .safety-tip-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}

/* Focus indicators for accessibility */
.btn:focus,
.form-control:focus,
.accordion-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    #map,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
