/* Main Styles */
:root {
    --main-bg-color: #6e61d2;
    --main-text-color: #ffffff;
    --button-bg-color: #ffffff;
    --button-text-color: #6e61d2;
    --button-hover-color: #f5f5f5;
    --back-btn-color: #ffffff;
    --vh: 1vh; /* Default value, will be updated by JS */
    --accent-color-1: #FFCB00; /* Yellow */
    --accent-color-2: #FF3D76; /* Pink */
    --accent-color-3: #00D647; /* Green */
    --shadow-light: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-medium: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-heavy: 0 8px 24px rgba(0,0,0,0.16);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Ensure screens are properly hidden by default */
.screen {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.screen.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
}

/* Welcome screen visible by default */
#welcome-screen {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Explicitly hide thank you screen */
#thankYouScreen.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    z-index: -999;
    pointer-events: none;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(145deg, #7c6fe4, #6355c0);
    color: var(--main-text-color);
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100); /* Fix for mobile browsers */
    height: -webkit-fill-available; /* For iOS Safari */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
    position: relative; /* For splash screen positioning */
}

html {
    height: -webkit-fill-available; /* For iOS Safari */
}

/* Enhanced splash screen handling */
#splash-screen.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: -1 !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Force all screens to be visible when splash is hidden */
#splash-screen.hidden ~ .app-container .screen {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #7c6fe4, #6355c0);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.splash-logo {
    width: 200px;
    margin-bottom: 40px;
    animation: pulse 2s infinite;
    text-align: center;
}

.splash-logo img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

.loading-text {
    color: white;
    margin-top: 20px;
    font-size: 1rem;
    opacity: 0.8;
    animation: pulse 1.5s infinite;
}

.splash-spinner {
    width: 40px;
    height: 40px;
    position: relative;
}

.splash-spinner:before,
.splash-spinner:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--accent-color-2);
    opacity: 0.6;
    animation: sk-bounce 2s infinite ease-in-out;
}

.splash-spinner:after {
    animation-delay: -1.0s;
    background-color: var(--accent-color-3);
}

@keyframes sk-bounce {
    0%, 100% { transform: scale(0); }
    50% { transform: scale(1.0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Main App Styles */
.app-container {
    position: relative;
    width: 100%;
    max-width: 768px;
    height: 100vh;
    height: -webkit-fill-available; /* For iOS Safari */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    background-color: transparent;
    border-radius: var(--border-radius-lg);
    box-shadow: none;
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .app-container {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

.screen {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 1.5rem;
    min-height: 100%;
    border-radius: var(--border-radius-lg);
    background-color: transparent;
    box-shadow: none;
    transition: all var(--transition-normal);
}

h1, h2 {
    margin-bottom: 2rem;
    font-weight: 600;
    word-wrap: break-word;
    color: #ffffff;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
}

.logo-container {
    margin-bottom: 3rem;
    width: 100%;
    max-width: 280px;
    text-align: center;
    transition: transform var(--transition-normal);
}

.logo-container:hover {
    transform: scale(1.05);
}

.monday-logo {
    width: auto;
    max-width: 280px;
    height: auto;
    max-height: 70px;
}

/* Button Styles */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 320px;
}

.purpose-btn, .firearm-btn, .submit-btn, .new-visitor-btn {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: clamp(0.8rem, 3vw, 1.2rem);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    -webkit-appearance: none; /* Remove default styling on iOS */
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.purpose-btn:before, 
.firearm-btn:before, 
.submit-btn:before, 
.new-visitor-btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: left 0.5s ease-in-out;
}

.purpose-btn:hover:before, 
.firearm-btn:hover:before, 
.submit-btn:hover:before, 
.new-visitor-btn:hover:before {
    left: 100%;
}

.purpose-btn:hover, .firearm-btn:hover, .submit-btn:hover, .new-visitor-btn:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.purpose-btn:active, .firearm-btn:active, .submit-btn:active, .new-visitor-btn:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-light);
}

/* Generate different accent colors for purpose buttons */
.purpose-btn { background-color: var(--button-bg-color); color: var(--button-text-color); }
.purpose-btn:nth-child(1):hover { background-color: #f5f5f5; color: var(--button-text-color); }
.purpose-btn:nth-child(2):hover { background-color: #f5f5f5; color: var(--button-text-color); }
.purpose-btn:nth-child(3):hover { background-color: #f5f5f5; color: var(--button-text-color); }
.purpose-btn:nth-child(4):hover { background-color: #f5f5f5; color: var(--button-text-color); }

.back-btn {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: none;
    border: none;
    color: var(--back-btn-color);
    font-size: clamp(1rem, 3vw, 1.2rem);
    cursor: pointer;
    font-weight: 500;
    padding: 0.5rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.back-btn:hover {
    transform: translateX(-3px);
}

/* Host List Styles */
.search-container {
    width: 100%;
    max-width: 320px;
    margin-bottom: 1.5rem;
    position: relative;
}

.search-container:before {
    content: "🔍";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.5;
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
    outline: none;
    z-index: 2;
}

.clear-search-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

/* Loading overlay for search */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(110, 97, 210, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    transition: all 0.3s ease;
    border-radius: 8px;
}

/* Hide Recently Viewed Hosts completely */
.recent-hosts-section {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.recent-hosts-container,
.host-item.recent,
.separator {
    display: none !important;
}

input[type="text"] {
    width: 100%;
    padding: 1rem 1rem 1rem 2.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    box-shadow: var(--shadow-light);
    -webkit-appearance: none; /* Remove default styling on iOS */
    transition: all var(--transition-fast);
}

input[type="text"]:focus {
    outline: none;
    box-shadow: var(--shadow-medium);
    border-color: var(--button-bg-color);
}

.hosts-container {
    width: 100%;
    max-width: 320px;
    max-height: 40vh;
    overflow-y: auto;
    margin-top: 1rem;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding: 0.5rem;
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-medium) inset;
}

.host-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius-md);
    margin-bottom: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(0,0,0,0.05);
}

.host-item:last-child {
    margin-bottom: 0;
}

.host-item:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-medium);
}

.host-item:active {
    transform: scale(0.98);
}

.host-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--accent-color-1);
    box-shadow: var(--shadow-light);
    transition: all var(--transition-fast);
}

.host-item:hover .host-avatar {
    transform: scale(1.1);
    border-color: var(--accent-color-2);
}

.host-info {
    text-align: left;
    flex-grow: 1;
    overflow: hidden;
}

.host-name {
    color: #333;
    font-weight: 600;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.host-title {
    color: #666;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cache indicator */
.cache-indicator {
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    border-radius: 4px;
    margin: 5px 0;
    text-align: center;
    transition: all 0.3s ease;
}

.cache-indicator.error {
    background-color: rgba(255, 61, 87, 0.2);
    color: #ff7373;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 90%;
    text-align: center;
    z-index: 9999;
    transition: bottom 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.toast.visible {
    bottom: 20px;
}

/* Time ago display */
.time-ago {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 5px;
    font-style: italic;
}

/* Utility Classes */
.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-top: 2px solid #666;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    padding: 1rem;
    color: #ff3d57;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-md);
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.no-results {
    padding: 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
}

.white-star {
    position: absolute;
    width: 24px;
    height: 24px;
    background-image: url('../images/star.svg');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
    opacity: 0.4;
    animation: starTwinkle 3s ease-in-out infinite;
}

.top-right {
    top: 5%;
    right: 5%;
    animation-delay: 0.5s;
}

.bottom-left {
    bottom: 5%;
    left: 5%;
    animation-delay: 1s;
}

@keyframes starTwinkle {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.gun-emoji {
    font-size: 1.5rem;
    display: inline-block;
    margin-left: 0.5rem;
    animation: gunWiggle 2s ease-in-out infinite;
}

@keyframes gunWiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* Enhanced Thank You Page */
#thankYouScreen {
    text-align: center;
    background-color: var(--main-bg-color);
    color: #fff;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
}

#thankYouScreen h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--accent-color-1);
    font-weight: 600;
}

.thank-you-message {
    font-size: 18px;
    margin-bottom: 20px;
    max-width: 600px;
    line-height: 1.5;
}

.host-notification-info {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid var(--accent-color-1);
    text-align: left;
    max-width: 600px;
    width: 100%;
}

.notified-host {
    display: flex;
    align-items: center;
    font-size: 16px;
}

.notified-host strong {
    color: var(--accent-color-1);
    margin-right: 5px;
}

.redirect-countdown {
    margin-top: 30px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Confetti container */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #fff;
    pointer-events: none;
    animation: confetti-fall 4s ease-out forwards;
    z-index: 10;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Touch feedback for mobile devices */
.mobile-device .purpose-btn:active,
.mobile-device .firearm-btn:active,
.mobile-device .submit-btn:active,
.mobile-device .new-visitor-btn:active,
.mobile-device .host-item:active,
.mobile-device .back-btn:active {
    opacity: 0.7;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .app-container {
        padding: 0.5rem;
        justify-content: flex-start;
        padding-top: 3rem;
        box-shadow: none;
        border-radius: 0;
        background-color: transparent;
    }
    
    .screen {
        justify-content: flex-start;
        padding-top: 3rem;
        box-shadow: none;
        border-radius: 0;
    }
    
    .back-btn {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .hosts-container {
        max-height: 50vh;
    }
    
    .white-star {
        width: 16px;
        height: 16px;
    }
    
    .gun-emoji {
        font-size: 1.2rem;
    }

    #thankYouScreen h2 {
        font-size: 2rem;
    }

    .purpose-btn, .firearm-btn, .submit-btn, .new-visitor-btn {
        padding: 1rem;
    }
}

/* Tablet Adjustments */
@media (min-width: 481px) and (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }
    
    .hosts-container {
        max-height: 45vh;
        max-width: 400px;
    }
    
    .search-container, .button-container {
        max-width: 400px;
    }
}

/* Landscape Mode Adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .app-container {
        justify-content: flex-start;
        padding: 0.5rem;
    }
    
    .screen {
        padding-top: 2.5rem;
        justify-content: flex-start;
    }
    
    h1 {
        margin-bottom: 0.5rem;
    }
    
    h2 {
        margin-bottom: 1rem;
    }
    
    .logo-container {
        margin-bottom: 1rem;
    }
    
    .button-container {
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .purpose-btn, .firearm-btn {
        max-width: 45%;
    }
    
    .hosts-container {
        max-height: 40vh;
    }
}

/* iPhone X/notched devices adjustments */
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2),
       only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3),
       only screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) {
    .app-container {
        padding-top: max(3rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.screen {
    animation: fadeIn 0.4s ease forwards;
}

/* Better scrollbar styling */
.hosts-container::-webkit-scrollbar {
    width: 6px;
}

.hosts-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.hosts-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.hosts-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Float animation for logo */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.logo-container {
    animation: float 6s ease-in-out infinite;
}

/* Continue button styling */
#continue-btn {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: white;
    color: var(--main-bg-color);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    box-shadow: var(--shadow-light);
    transition: all var(--transition-fast);
}

#continue-btn:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

#continue-btn:active {
    transform: translateY(1px);
}

/* Add these styles for the version indicator and button icons */

/* Version indicator */
.version-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    z-index: 5;
    font-family: 'Poppins', sans-serif;
}

.dark-mode .version-indicator {
    color: rgba(255, 255, 255, 0.3);
}

/* Button icons */
.btn-icon {
    margin-right: 6px;
    font-size: 1.1em;
    display: inline-block;
    transition: transform 0.3s ease;
}

.purpose-btn:hover .btn-icon {
    transform: scale(1.2);
}

.firearm-btn {
    background-color: var(--button-bg-color);
    color: var(--button-text-color);
    border: none;
    border-radius: var(--border-radius-lg);
    padding: clamp(1rem, 3vw, 1.5rem);
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    max-width: 150px;
    margin: 0 10px;
    -webkit-appearance: none; /* Remove default styling on iOS */
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.firearm-btn[data-firearm="yes"] {
    background-color: #ff6b6b;
    color: white;
}

.firearm-btn[data-firearm="no"] {
    background-color: #51cf66;
    color: white;
}

.firearm-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

/* Update the firearm screen button container to display buttons side by side */
#firearm-screen .button-container {
    flex-direction: row;
    justify-content: center;
}

/* Popular searches styling */
.popular-searches {
    margin-top: 8px;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.025);
    padding: 8px 12px;
    font-size: 0.9rem;
}

.popular-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 6px;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-tag {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.popular-tag:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Search suggestions for "no results" state */
.search-suggestions {
    margin-top: 16px;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    font-size: 0.9rem;
}

.search-suggestions p {
    margin: 0 0 8px 0;
    color: #666;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-tag {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-tag:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

/* Cache indicator */
.cache-indicator {
    padding: 6px 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: #666;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    text-align: center;
}

.cache-indicator.error {
    background-color: rgba(255, 0, 0, 0.05);
    color: #d32f2f;
}

/* Toast notification improvements */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    text-align: center;
    max-width: 80%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.toast.visible {
    opacity: 1;
}

/* Show time ago */
.time-ago {
    font-size: 0.7rem;
    color: #999;
    margin-top: 4px;
}

/* Mobile improvements */
@media (max-width: 768px) {
    .popular-searches {
        margin-top: 4px;
        padding: 6px 8px;
    }
    
    .popular-tag {
        padding: 3px 8px;
        font-size: 0.75rem;
    }
    
    .search-suggestions {
        padding: 8px;
    }
    
    .toast {
        bottom: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Popular searches section */
.popular-searches {
    margin: 12px 0;
    width: 100%;
    text-align: left;
    padding: 0 10px;
    animation: fadeIn 0.5s ease;
}

.popular-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-weight: 500;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.popular-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.popular-tag:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

/* Search suggestions when no results found */
.search-suggestions {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    text-align: center;
}

.search-suggestions p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.suggestion-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 5px 10px;
    border-radius: 100px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.suggestion-tag:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Cache indicator */
.cache-indicator {
    padding: 5px 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    border-radius: 4px;
    margin: 5px 0;
    text-align: center;
}

.cache-indicator.error {
    background-color: rgba(255, 61, 87, 0.2);
    color: #ff7373;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: -70px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    max-width: 90%;
    text-align: center;
    z-index: 9999;
    transition: bottom 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.toast.visible {
    bottom: 20px;
}

/* Time ago display */
.time-ago {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 5px;
    font-style: italic;
}

/* Responsive styles for new UI elements */
@media (max-width: 768px) {
    .popular-searches {
        padding: 0 5px;
        margin: 8px 0;
    }
    
    .popular-tag {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .search-suggestions {
        padding: 10px;
    }
    
    .toast {
        max-width: 95%;
        padding: 10px 15px;
    }
}

/* Search loading indicator */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    color: var(--main-text-color);
    font-size: 14px;
}

.search-loading.hidden {
    display: none;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

/* Toast container */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 90%;
    text-align: center;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Button styles for Thank You screen */
.primary-btn,
#newVisitorBtn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--accent-color-1);
    color: var(--main-bg-color);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.primary-btn:hover,
#newVisitorBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.primary-btn:active,
#newVisitorBtn:active,
.primary-btn.touch-active,
#newVisitorBtn.touch-active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hide firearm screen completely */
#firearm-screen {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    z-index: -999 !important;
    pointer-events: none !important;
}