/* Clean City - Custom Styles */

body {
    background-color: #020617;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(16, 185, 129, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
    background-attachment: fixed;
}

/* Global Select Styling */
select {
    color-scheme: dark;
    /* Helps native dropdowns on mobile */
}

/* Glassmorphism Card */
.glass-card {
    background: rgba(15, 23, 42, 0.4);
    /* Darker base for better contrast */
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 18px 36px -18px rgba(16, 185, 129, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Hero Gradient Background */
.hero-gradient {
    background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.15), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.1), transparent 50%);
}

/* Animated Background Dots */
.bg-dots {
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Button Glow Effect */
.btn-glow {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.btn-glow:hover::after {
    transform: translateX(100%);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.4);
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(15, 23, 42, 0.6);
    /* Much darker, more solid background */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Textarea */
textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* Select */
select.form-input,
.filter-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    background-size: 1.1rem;
    padding-right: 3.5rem !important;
    cursor: pointer;
}

/* Fix for invisible dropdown values */
select.form-input option {
    background-color: #0f172a;
    color: #ffffff;
    padding: 1rem;
}

select.form-input:active,
select.form-input:focus {
    background-color: #0f172a;
    /* Force dark background on interaction */
}

/* Pulse Animation */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Staggered Animation */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* TikTok Embed Container - Standard Size */
.tiktok-container {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: transparent;
}

.tiktok-container .tiktok-embed {
    margin: 0 !important;
}

/* Severity Badge */
.severity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
}

/* Status Indicator */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    color: white;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 9998;
}

.pwa-install-banner.show {
    transform: translateY(0);
}

/* Live Indicator */
.live-dot {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
}

.live-dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background-color: #10b981;
    opacity: 0.4;
    animation: live-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes live-ping {

    75%,
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Glass Badge Custom */
.badge-glass {
    background: rgba(16, 185, 129, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #10b981;
}

/* Typography Refinements */
h1,
h2,
h3,
h4 {
    letter-spacing: -0.025em;
    color: #ffffff;
    font-weight: 700;
}

p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Global Table Improvements */
table {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

tr {
    transition: all 0.2s ease;
}

/* Focus Ring for accessibility */
*:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 4px;
}