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

* {
    font-family: 'Poppins', sans-serif;
}

.font-display {
    font-family: 'Playfair Display', serif;
}

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

.gradient-bg {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #1e3a8a 100%);
}

.btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3);
}

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

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(251, 191, 36, 0.15);
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 4px;
    transition: all 0.3s ease;
}

.strength-weak { background-color: #ef4444; }
.strength-fair { background-color: #f97316; }
.strength-good { background-color: #eab308; }
.strength-strong { background-color: #10b981; }

.password-match-indicator {
    display: inline-block;
    margin-left: 8px;
    font-size: 14px;
    font-weight: 500;
}

.match-success { color: #10b981; }
.match-error { color: #ef4444; }

.password-toggle-btn {
    cursor: pointer;
    user-select: none;
}

/* CSS Variables for theme colors */
html.dark {
    --dropdown-bg: #1e293b;
    --dropdown-text: #ffffff;
    --dropdown-hover: #334155;
    --dropdown-border: #475569;
    --item-bg: #1e293b;
    --item-text: #ffffff;
    --item-subtext: #94a3b8;
    --button-remove: #f87171;
}

html:not(.dark) {
    --dropdown-bg: #f1f5f9;
    --dropdown-text: #1e293b;
    --dropdown-hover: #cbd5e1;
    --dropdown-border: #cbd5e1;
    --item-bg: #e2e8f0;
    --item-text: #1e293b;
    --item-subtext: #78909c;
    --button-remove: #dc2626;
}

.dropdown-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    border: 1px solid var(--dropdown-border);
    margin-bottom: 4px;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--dropdown-hover);
}

html.dark .dropdown-item:hover {
    background-color: #475569;
}

html:not(.dark) .dropdown-item:hover {
    background-color: #cbd5e1;
}

/* Accent styling for dropdown items when visible */
html.dark .dropdown-item {
    background-color: #334155 !important;
}

html:not(.dark) .dropdown-item {
    background-color: #e2e8f0 !important;
}

.selected-camera-item {
    border: 1px solid var(--dropdown-border) !important;
}

.filter-item {
    border: 1px solid var(--dropdown-border) !important;
}

/* Light theme */
html:not(.dark) {
    color-scheme: light;
}

html:not(.dark) body {
    background-color: #ffffff;
    color: #1e293b;
}

html:not(.dark) nav {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: #e2e8f0;
}

html:not(.dark) .bg-slate-900\/50 {
    background-color: rgba(241, 245, 249, 0.8);
    border-color: #e2e8f0;
}

html:not(.dark) .border-slate-700 {
    border-color: #cbd5e1;
}

html:not(.dark) .text-slate-300 {
    color: #94a3b8;
}

html:not(.dark) .text-slate-400 {
    color: #78909c;
}

html:not(.dark) .text-white {
    color: #1e293b;
}

html:not(.dark) h1,
html:not(.dark) h2 {
    color: #1e293b;
}

html:not(.dark) p {
    color: #475569;
}

html:not(.dark) input {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #cbd5e1;
}

html:not(.dark) input:focus {
    background-color: #ffffff;
    border-color: #f59e0b;
}

html:not(.dark) #currency-selector {
    background-color: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

html:not(.dark) #currency-selector:hover {
    background-color: #cbd5e1;
}

html:not(.dark) #currency-selector option {
    background-color: #ffffff;
    color: #1e293b;
}

html:not(.dark) #theme-toggle {
    background-color: #1e293b;
    color: #f1f5f9;
    border-color: #0f172a;
}

html:not(.dark) #theme-toggle:hover {
    background-color: #0f172a;
}

html.dark #theme-toggle {
    background-color: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
}

html.dark #theme-toggle:hover {
    background-color: #e2e8f0;
}

html:not(.dark) #user-menu-btn {
    background-color: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

html:not(.dark) #user-menu-btn:hover {
    background-color: #cbd5e1;
}

html:not(.dark) #user-menu {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

html:not(.dark) #user-menu a,
html:not(.dark) #user-menu button {
    color: #475569;
}

html:not(.dark) #user-menu a:hover,
html:not(.dark) #user-menu button:hover {
    color: #1e293b;
    background-color: #e2e8f0;
}

html:not(.dark) #user-menu hr {
    border-color: #cbd5e1;
}

html:not(.dark) #error-message,
html:not(.dark) #password-error,
html:not(.dark) #payment-error {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

html:not(.dark) #success-message,
html:not(.dark) #password-success,
html:not(.dark) #payment-success {
    background-color: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

html:not(.dark) .stars {
    display: none;
}

html:not(.dark) .gradient-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e0e7ff 100%);
}

/* Light theme for compare-builder - override all dark theme elements */
html:not(.dark) #camera-dropdown,
html:not(.dark) #camera-dropdown.bg-slate-800 {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
}

html:not(.dark) #camera-search {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) #camera-search::placeholder {
    color: #94a3b8 !important;
}

html:not(.dark) #camera-search:focus {
    background-color: #ffffff !important;
    border-color: #f59e0b !important;
}

html:not(.dark) .selected-camera-item {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .selected-camera-item span {
    color: #1e293b !important;
}

html:not(.dark) .selected-camera-item button {
    color: #dc2626 !important;
}

html:not(.dark) .selected-camera-item button:hover {
    color: #b91c1c !important;
}

html:not(.dark) .filter-item {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .filter-item p {
    color: #1e293b !important;
}

html:not(.dark) .legend-item {
    color: #1e293b !important;
}

html:not(.dark) .legend-item.disabled {
    color: #94a3b8 !important;
}

html:not(.dark) #filter-section p {
    color: #475569 !important;
}

html:not(.dark) #filter-section a {
    color: #f59e0b !important;
}

html:not(.dark) #filter-section a:hover {
    color: #d97706 !important;
}

/* Light theme for selected-cameras container */
html:not(.dark) #selected-cameras {
    background-color: transparent;
}

html.dark #selected-cameras {
    background-color: transparent;
}

/* PRO TRIAL Ribbon */
.pro-trial-ribbon {
    position: absolute;
    top: 20px;
    right: -60px;
    width: 280px;
    padding: 14px 0px 14px 60px ;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    text-align: center;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    line-height: 1.5;
    transform: rotate(45deg);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    z-index: 10;
    pointer-events: none;
    opacity: 0.85;
    display: block;
}

.pro-trial-ribbon.hidden {
    display: none;
}

/* Ensure burger menu button is above the ribbon but semi-transparent */
#user-menu-btn {
    position: relative;
    z-index: 50;
    background-color: rgba(30, 41, 59, 0.7) !important;
}

/* Make currency selector and theme toggle above ribbon */
#currency-selector {
    position: relative;
    z-index: 30;
}

#theme-toggle {
    position: relative;
    z-index: 30;
    background-color: rgba(30, 41, 59, 0.7) !important;
}

/* Featured pricing card with shimmer effect */
.pricing-card.featured {
    border: 2px solid #f59e0b;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3), 0 0 40px rgba(245, 158, 11, 0.1);
}

html:not(.dark) .pricing-card.featured {
    border: 2px solid #d97706;
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.4), 0 0 40px rgba(217, 119, 6, 0.2);
}

/* Clouds for light theme (counterpart to stars in dark theme) */
.clouds {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background-color: rgba(226, 232, 240, 0.4);
    border-radius: 50%;
    filter: blur(3px);
    animation: float 60s infinite ease-in-out;
}

/* Cloud shape using box-shadow to create puffy cloud effect */
.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background-color: inherit;
    border-radius: 50%;
}

.cloud-1 {
    width: 120px;
    height: 60px;
    border-radius: 60px;
}
.cloud-1::before {
    width: 75px;
    height: 75px;
    top: -38px;
    left: 15px;
}
.cloud-1::after {
    width: 52px;
    height: 52px;
    top: -27px;
    left: 68px;
}

.cloud-2 {
    width: 150px;
    height: 68px;
    border-radius: 68px;
}
.cloud-2::before {
    width: 82px;
    height: 82px;
    top: -45px;
    left: 22px;
}
.cloud-2::after {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 82px;
}

.cloud-3 {
    width: 180px;
    height: 75px;
    border-radius: 75px;
}
.cloud-3::before {
    width: 90px;
    height: 90px;
    top: -52px;
    left: 30px;
}
.cloud-3::after {
    width: 68px;
    height: 68px;
    top: -33px;
    left: 105px;
}

@keyframes float {
    0%, 100% { 
        transform: translateX(0) translateY(0); 
        opacity: 0.6;
    }
    25% { 
        transform: translateX(30px) translateY(-20px); 
        opacity: 0.8;
    }
    50% { 
        transform: translateX(60px) translateY(10px); 
        opacity: 0.7;
    }
    75% { 
        transform: translateX(30px) translateY(20px); 
        opacity: 0.9;
    }
}

/* Hide clouds in dark mode, show only in light mode */
html.dark .clouds {
    display: none;
}

html:not(.dark) .clouds {
    display: block;
}

/* Admin Panel Light Theme Fixes */
html:not(.dark) .bg-slate-950 {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

html:not(.dark) .bg-slate-900\/50 {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-color: #e2e8f0 !important;
}

html:not(.dark) .bg-slate-800\/50 {
    background-color: rgba(248, 250, 252, 0.8) !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .bg-slate-800\/30 {
    background-color: rgba(241, 245, 249, 0.9) !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .bg-slate-700 {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .bg-slate-600 {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
}

html:not(.dark) .bg-slate-600:hover {
    background-color: #cbd5e1 !important;
}

html:not(.dark) .border-slate-700 {
    border-color: #cbd5e1 !important;
}

html:not(.dark) .border-slate-600 {
    border-color: #cbd5e1 !important;
}

html:not(.dark) .text-slate-400 {
    color: #64748b !important;
}

html:not(.dark) .text-slate-300 {
    color: #475569 !important;
}

html:not(.dark) .text-slate-500 {
    color: #64748b !important;
}

/* Admin panel specific card styling for light theme */
html:not(.dark) .bg-slate-900\/50.backdrop-blur {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Admin dashboard stat cards */
html:not(.dark) .bg-slate-900\/50.backdrop-blur.border.border-slate-700.rounded-xl.p-6 {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: #e2e8f0 !important;
}

/* Admin table styling */
html:not(.dark) table thead tr {
    border-color: #e2e8f0 !important;
}

html:not(.dark) table th {
    color: #64748b !important;
}

html:not(.dark) table td {
    color: #1e293b !important;
}

/* Admin form inputs */
html:not(.dark) select {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) select:hover {
    background-color: #e2e8f0 !important;
}

html:not(.dark) select option {
    background-color: #ffffff !important;
    color: #1e293b !important;
}

/* Admin buttons */
html:not(.dark) .bg-slate-700:hover {
    background-color: #cbd5e1 !important;
}

/* Tab styling for admin panel */
html:not(.dark) .tab-btn {
    color: #64748b !important;
}

html:not(.dark) .tab-btn:hover {
    color: #1e293b !important;
}

html:not(.dark) .tab-btn.border-amber-400 {
    color: #d97706 !important;
}

/* Admin panel text colors */
html:not(.dark) .text-white {
    color: #1e293b !important;
}

/* Progress bar container */
html:not(.dark) .bg-slate-600 {
    background-color: #e2e8f0 !important;
}

/* Ensure proper contrast for amber text on light backgrounds */
html:not(.dark) .text-amber-400 {
    color: #d97706 !important;
}

html:not(.dark) .text-blue-400 {
    color: #2563eb !important;
}

html:not(.dark) .text-green-400 {
    color: #16a34a !important;
}

html:not(.dark) .text-purple-400 {
    color: #9333ea !important;
}

/* Leaflet map popup styling for light theme */
html:not(.dark) .leaflet-popup-content-wrapper {
    background-color: #ffffff !important;
    color: #1e293b !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .leaflet-popup-tip {
    background-color: #ffffff !important;
}

html:not(.dark) .leaflet-popup-content {
    color: #1e293b !important;
}

/* Leaflet controls styling for light theme */
html:not(.dark) .leaflet-control-zoom a {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

html:not(.dark) .leaflet-control-zoom a:hover {
    background-color: #f1f5f9 !important;
}

html:not(.dark) .leaflet-control-attribution {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #64748b !important;
}

html:not(.dark) .leaflet-control-attribution a {
    color: #2563eb !important;
}
