/* Hunt Feed - Modern Mobile-First Interface */
/* Redesigned for optimal mobile experience with card-based layout */

/* Rank Badge Styles */
.rank-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: badgeSlideIn 0.3s ease-out;
}

.rank-badge .rank-icon {
    font-size: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.rank-badge .rank-number {
    font-size: 18px;
    font-weight: 900;
}

/* Special styling for top 3 ranks */
.rank-badge.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    transform: scale(1.1);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #E0E0E0);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #D4A574);
}

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

/* Mobile responsive rank badges */
@media (max-width: 768px) {
    .rank-badge {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .rank-badge .rank-icon {
        font-size: 16px;
    }
    
    .rank-badge .rank-number {
        font-size: 16px;
    }
}

/* Affiliate Integration - Subtle and Non-Intrusive */
.affiliate-ad {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: auto;
    padding: 16px;
    background: linear-gradient(135deg, rgba(0, 87, 255, 0.1) 0%, rgba(78, 205, 196, 0.1) 100%);
    border-radius: 16px;
    margin: 8px 16px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ad-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 87, 255, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
}

.affiliate-product {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    max-width: 100%;
    gap: 12px;
    flex: 1;
}

.affiliate-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.2);
}

.affiliate-placeholder {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 24px;
    flex-shrink: 0;
}

.affiliate-info {
    color: #fff;
    flex: 1;
    min-width: 0;
}

.affiliate-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.affiliate-description {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 8px 0;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.affiliate-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--thingvalla-primary);
    margin-bottom: 0;
}

.affiliate-cta {
    background: linear-gradient(135deg, var(--thingvalla-primary) 0%, var(--thingvalla-secondary) 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(0, 87, 255, 0.3);
}

.affiliate-cta:hover {
    background: linear-gradient(135deg, var(--thingvalla-secondary) 0%, var(--thingvalla-primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 87, 255, 0.4);
}

.affiliate-skip {
    position: absolute;
    top: 8px;
    right: 8px;
}

.skip-ad-btn {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 12px;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.skip-ad-btn:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
}

/* Mobile optimizations for affiliate ads */
@media (max-width: 768px) {
    .affiliate-ad {
        margin: 5px;
        padding: 15px;
    }
    
    .affiliate-image, .affiliate-placeholder {
        width: 100px;
        height: 100px;
    }
    
    .affiliate-name {
        font-size: 18px;
    }
    
    .affiliate-description {
        font-size: 13px;
    }
    
    .affiliate-cta {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.hunt-feed {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: #fff;
    z-index: 10000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    margin: 0 !important;
    padding: 0 !important;
    
    /* Smooth entrance animation */
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
}

.hunt-feed.active {
    transform: translateY(0);
}

/* Mobile-first design */
.hunt-feed.mobile {
    /* Full screen mobile experience */
}

.hunt-feed.desktop {
    /* Desktop full-screen overlay */
    background: rgba(0, 0, 0, 1);
    display: flex;
    flex-direction: column;
}

/* Modern Minimalist Header */
.hunt-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: env(safe-area-inset-top, 12px) 20px 12px 20px;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 10002 !important;
    min-height: 64px;
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-width: auto;
    min-height: 44px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.hunt-feed-title {
    text-align: center;
    flex: 1;
    margin: 0 16px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hunt-feed-title span:first-child {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hunt-feed-title span:last-child {
    display: block;
    font-size: 12px;
    opacity: 0.6;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hunt-feed-actions {
    display: flex;
    gap: 6px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px;
    border-radius: 16px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    backdrop-filter: blur(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.filter-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Modern Card-Based Content Layout */
.hunt-feed-content {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 100%);
}

.image-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px 16px;
    margin-bottom: 0;
    height: 100vh;
}

.image-wrapper {
    position: relative;
    width: auto;
    max-width: 95%;
    height: auto;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
}

.image-wrapper img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    object-position: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 20px;
    display: block;
}

/* Modern Image Positioning */
.image-wrapper .original-image {
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.image-wrapper .processed-image {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    z-index: 2 !important;
    border-radius: 8px !important;
}

/* Disable any hover effects on hunt feed images */
.hunt-feed .image-wrapper:hover .processed-image {
    opacity: 0 !important;
}

.hunt-feed .image-wrapper:hover .original-image {
    opacity: 1 !important;
}

/* Show processed image only when AI toggle is active (no more hover) */
.hunt-feed .image-wrapper.show-processed .processed-image {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 3 !important;
}

.hunt-feed .image-wrapper.show-processed .original-image {
    opacity: 0 !important;
}

/* Ensure original image is always visible by default */
.hunt-feed .image-wrapper:not(.show-processed) .original-image {
    opacity: 1 !important;
    display: block !important;
}

.hunt-feed .image-wrapper:not(.show-processed) .processed-image {
    opacity: 0 !important;
    display: block !important;
}

/* AI Toggle button - only shows after user has scored */
.ai-toggle-btn {
    position: absolute !important;
    bottom: 12px !important;
    right: 12px !important;
    background: rgba(0, 0, 0, 0.8) !important;
    border: 2px solid rgba(0, 87, 255, 0.6) !important;
    color: var(--thingvalla-primary) !important;
    padding: 8px 16px !important;
    border-radius: 20px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(10px) !important;
    z-index: 1000 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    display: block !important;
    visibility: visible !important;
}

.ai-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: var(--thingvalla-primary);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.ai-toggle-btn.active {
    background: var(--thingvalla-primary);
    border-color: var(--thingvalla-primary);
    color: #000;
    box-shadow: 0 2px 12px rgba(78, 205, 196, 0.5);
}

.ai-toggle-btn span {
    display: block;
}

/* AI button replaces old mobile hints */

.image-wrapper.locked img.blurred {
    filter: blur(20px);
    opacity: 0.5;
}

.lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.lock-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.lock-message {
    font-size: 14px;
    font-weight: 500;
}


/* Modern Floating Action Buttons */
.image-actions {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 20;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 56px;
    min-height: 56px;
    justify-content: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.action-btn.active {
    color: var(--thingvalla-primary);
    background: rgba(0, 87, 255, 0.2);
    border-color: var(--thingvalla-primary);
    box-shadow: 0 0 20px rgba(0, 87, 255, 0.4);
}

.action-btn svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.action-btn span {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

.score-btn.scored {
    color: var(--thingvalla-primary);
    background: rgba(0, 87, 255, 0.2);
    border-color: var(--thingvalla-primary);
    cursor: default;
    box-shadow: 0 0 20px rgba(0, 87, 255, 0.3);
}

.score-btn.scored svg {
    fill: var(--thingvalla-primary);
}

.score-btn.locked {
    color: #666;
    cursor: not-allowed;
    opacity: 0.4;
    background: rgba(255, 255, 255, 0.05);
}

/* AI Button Styling */
.ai-btn {
    display: none; /* Hidden by default */
}

.ai-btn.active {
    color: var(--thingvalla-primary) !important;
    background: rgba(78, 205, 196, 0.2) !important;
}

.ai-btn.active svg {
    stroke: var(--thingvalla-primary) !important;
}

/* Score Information Display */
.score-info {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.scores-display {
    font-size: 16px;
    font-weight: 600;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    letter-spacing: 0.5px;
}

/* Beta tag styling for AI estimate */
.scores-display small {
    font-size: 11px;
    opacity: 0.7;
    font-weight: normal;
    margin-left: 2px;
}

/* Modern Information Overlay */
.image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    border-radius: 0 0 20px 20px;
    backdrop-filter: blur(15px);
    z-index: 10;
}

.unit-info, .user-info, .score-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.unit-info .unit-name {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unit-info .animal-type {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 600;
    color: var(--thingvalla-primary);
    background: rgba(0, 87, 255, 0.1);
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 87, 255, 0.3);
}

.user-info .username {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-info .username::before {
    content: "👤";
    font-size: 12px;
    opacity: 0.7;
}

.user-info .upload-date {
    font-size: 12px;
    opacity: 0.6;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-info .upload-date::before {
    content: "📅";
    font-size: 10px;
    opacity: 0.7;
}

.score-info span {
    font-size: 12px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin-right: 8px;
}

/* Progress Bar */
.hunt-feed-progress {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--thingvalla-primary) 0%, var(--thingvalla-secondary) 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    text-align: center;
    opacity: 0.8;
}

/* Filters Panel */
.filters-panel {
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
    display: flex;
    flex-direction: column;
    border-left: 2px solid rgba(255, 255, 255, 0.2);
}

/* Force visibility for all filter content */
.filters-panel * {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

.filters-panel select {
    display: block !important;
}

.filters-panel button {
    display: block !important;
}

.filters-panel.active {
    right: 0;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filters-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-filters {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filters-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    /* Debug styling to make content visible */
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    min-height: 200px !important;
    display: flex !important;
    flex-direction: column !important;
}

.filter-group {
    margin-bottom: 24px !important;
    /* Debug: Make filter groups visible */
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    padding: 12px !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    display: block !important;
    width: 100% !important;
}

.filter-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    opacity: 1;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.filter-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--thingvalla-primary);
    box-shadow: 0 0 0 2px rgba(78, 205, 196, 0.3);
}

.filter-group select option {
    background: #1a1a1a;
    color: #fff;
}

.apply-filters-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--thingvalla-primary) 0%, var(--thingvalla-secondary) 100%);
    border: none;
    color: var(--thingvalla-white);
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 87, 255, 0.3);
}

.apply-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 87, 255, 0.4);
}

/* Quick Score Modal */
.quick-score-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300;
    pointer-events: none;
}

.quick-score-modal.active {
    transform: translateY(0);
    pointer-events: auto;
}

.score-slider-container {
    background: linear-gradient(to top, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.85) 70%, 
        transparent 100%);
    padding: 30px 20px 40px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.score-slider-container::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.score-instructions {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.8);
}

.score-display {
    background: #4ECDC4;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 28px;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(78,205,196,0.3);
    display: inline-block;
    margin-bottom: 20px;
    min-width: 80px;
}

#score-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    margin: 20px 0 25px 0;
    -webkit-appearance: none;
    position: relative;
}

#score-slider::-webkit-slider-thumb {
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 2px solid #4ECDC4;
}

#score-slider::-moz-range-thumb {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 2px solid #4ECDC4;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.score-presets {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

.score-preset {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-preset:hover {
    background: rgba(255, 255, 255, 0.2);
}

.score-preset.active {
    background: #4ECDC4;
    border-color: #4ECDC4;
    color: white;
}

.score-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.score-actions button {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cancel-score {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.submit-score {
    background: linear-gradient(135deg, var(--thingvalla-primary) 0%, var(--thingvalla-secondary) 100%);
    border: none;
    color: var(--thingvalla-white);
}

/* Mobile-specific adjustments for scoring UI */
@media (max-width: 768px) and (max-height: 900px) {
    .quick-score-modal {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        max-height: 70vh;
        padding-bottom: env(safe-area-inset-bottom, 25px);
    }
    
    .score-slider-container {
        max-height: calc(70vh - env(safe-area-inset-bottom, 25px));
        padding: 25px 15px 35px;
        padding-bottom: 35px;
        margin-bottom: env(safe-area-inset-bottom, 25px);
    }
    
    .score-display {
        font-size: 24px;
        padding: 6px 16px;
        margin-bottom: 15px;
    }
    
    .score-presets {
        margin: 12px 0;
    }
    
    .score-preset {
        min-width: 45px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #score-slider {
        margin: 15px 0 20px 0;
    }
    
    .score-instructions {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .score-actions {
        margin-top: 12px;
    }
    
    .score-actions button {
        min-height: 44px;
        font-size: 13px;
        padding: 12px 14px;
    }
}

/* Extra padding for devices with home indicators/notches */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .quick-score-modal {
        padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
    }
    
    .score-slider-container {
        margin-bottom: 0;
        padding-bottom: 40px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Specific fix for mobile Chrome */
@media (max-width: 768px) {
    .quick-score-modal.active {
        bottom: 0;
        padding-bottom: 80px; /* Extra padding for mobile browsers */
    }
    
    .score-slider-container {
        max-height: calc(60vh - 80px);
    }
}

.submit-score:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 87, 255, 0.3);
}

/* Loading States */
.hunt-feed-loading, .hunt-feed-empty {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1 !important; /* Below header */
    padding: 80px 20px 20px 20px; /* Top padding for header */
    text-align: center;
    background: #000;
    backdrop-filter: blur(10px);
    margin: 0 !important;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--thingvalla-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.loading-text, .empty-title {
    font-size: 16px;
    font-weight: 500;
    opacity: 0.8;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-message {
    font-size: 14px;
    opacity: 0.6;
    text-align: center;
    max-width: 280px;
    line-height: 1.4;
}

/* Desktop Responsive Adjustments */
@media (min-width: 769px) {
    .hunt-feed {
        /* Ensure full screen on desktop */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
    }
    
    .hunt-feed-header {
        padding: 16px 32px;
        min-height: 64px;
        background: rgba(0, 0, 0, 0.9);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    }
    
    .hunt-feed-content {
        max-width: 100%;
        margin: 0;
    }
    
    .image-container {
        padding: 20px;
    }
    
    .image-info {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none;
        width: auto;
        padding: 0 32px;
        max-width: 1200px;
        margin: 20px auto 0;
        background: transparent;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .hunt-feed-loading, .hunt-feed-empty {
        padding: 100px 20px 20px 20px;
        z-index: 1 !important; /* Ensure below header on desktop too */
    }
    
    .back-btn {
        padding: 10px 20px;
        font-size: 16px;
    }
    
    .filter-btn {
        width: 44px;
        height: 44px;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
    .hunt-feed-header {
        padding: 6px 12px;
        min-height: 52px;
        z-index: 10002 !important; /* Ensure header is above empty state */
        position: relative !important;
        background: rgba(0,0,0,0.9) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .hunt-feed-loading, .hunt-feed-empty {
        padding: 70px 20px 20px 20px; /* More top padding to clear header */
        z-index: 1 !important; /* Much lower z-index - well below header */
        top: 0 !important;
        position: absolute !important;
    }
    
    .back-btn {
        padding: 5px 8px;
        font-size: 12px;
        border-radius: 14px;
    }
    
    .back-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .hunt-feed-title {
        margin: 0 8px;
    }
    
    .hunt-feed-title span:first-child {
        font-size: 14px;
    }
    
    .hunt-feed-title span:last-child {
        font-size: 10px;
    }
    
    .filter-btn {
        width: 32px;
        height: 32px;
        padding: 5px;
        border-radius: 10px;
    }
    
    .filter-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Tablet and larger mobile screens */
@media (min-width: 481px) and (max-width: 767px) {
    .hunt-feed-header {
        padding: 8px 14px;
        min-height: 54px;
    }
    
    .back-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .hunt-feed-title span:first-child {
        font-size: 15px;
    }
    
    .filter-btn {
        width: 34px;
        height: 34px;
    }
}

/* Desktop Responsive */
@media (min-width: 768px) {
    .hunt-feed.desktop {
        padding: 20px;
        align-items: center;
        justify-content: center;
    }
    
    .hunt-feed.desktop .hunt-feed-content {
        max-width: 90vw;
        max-height: 90vh;
        background: rgba(0, 0, 0, 0.8);
        border-radius: 12px;
        overflow: hidden;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .hunt-feed.desktop .hunt-feed-header {
        padding: 12px 20px;
        min-height: 60px;
        border-radius: 12px 12px 0 0;
    }
    
    .hunt-feed.desktop .back-btn {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 18px;
    }
    
    .hunt-feed.desktop .back-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .hunt-feed.desktop .hunt-feed-title span:first-child {
        font-size: 18px;
    }
    
    .hunt-feed.desktop .hunt-feed-title span:last-child {
        font-size: 12px;
    }
    
    .hunt-feed.desktop .filter-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
        border-radius: 14px;
    }
    
    .hunt-feed.desktop .filter-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .hunt-feed.desktop .image-container {
        max-height: 60vh;
        min-height: 400px;
    }
    
    .hunt-feed.desktop .image-wrapper {
        max-height: 60vh;
        min-height: 400px;
    }
    
    .hunt-feed.desktop .image-wrapper img {
        max-height: 60vh;
        max-width: 90vw;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .filters-panel {
        max-width: 400px;
        border-radius: 12px 0 0 12px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Large desktop screens */
@media (min-width: 1200px) {
    .hunt-feed.desktop .hunt-feed-content {
        max-width: 85vw;
        max-height: 85vh;
    }
    
    .hunt-feed.desktop .hunt-feed-header {
        padding: 16px 24px;
        min-height: 64px;
    }
    
    .hunt-feed.desktop .back-btn {
        padding: 10px 20px;
        font-size: 15px;
    }
}

/* Smooth touch interactions - exclude interactive elements */
.hunt-feed .feed-content,
.hunt-feed .image-card,
.hunt-feed .stats-grid {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Allow interactions on interactive elements */
.hunt-feed input,
.hunt-feed button,
.hunt-feed select,
.hunt-feed textarea,
.hunt-feed a,
.hunt-feed .btn,
.hunt-feed .form-control,
.hunt-feed .modal *,
.modal * {
    -webkit-user-select: auto;
    user-select: auto;
    -webkit-touch-callout: auto;
}

/* iOS safe area support */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .hunt-feed {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .hunt-feed-header {
        padding-top: max(12px, env(safe-area-inset-top));
    }
}

/* Haptic feedback animation */
@keyframes haptic-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.haptic-feedback {
    animation: haptic-pulse 0.2s ease-out;
}

/* Swipe hint animations */
@keyframes swipe-hint {
    0%, 100% { opacity: 0.5; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-10px); }
}

.swipe-hint {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    opacity: 0.5;
    animation: swipe-hint 2s ease-in-out infinite;
    pointer-events: none;
}
/* Reset Filters Button */
.reset-filters-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background: rgba(0, 87, 255, 0.2);
    color: var(--thingvalla-primary);
    border: 1px solid var(--thingvalla-primary);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-btn:hover {
    background: rgba(0, 87, 255, 0.3);
    transform: scale(1.05);
}

.empty-message {
    font-size: 14px;
    opacity: 0.6;
    margin-top: 8px;
}

/* Navigation Buttons */
.image-navigation {
    position: absolute;
    bottom: 120px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.nav-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.nav-btn svg {
    width: 24px;
    height: 24px;
}

/* Disable buttons when at limits */
.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .image-navigation {
        bottom: 100px;
        right: 15px;
    }
    
    .nav-btn {
        width: 44px;
        height: 44px;
    }
}

/* Ensure login modal appears above hunt feed */
#loginModal {
    z-index: 10001 !important;
}

.modal-backdrop.show {
    z-index: 10000 !important;
}

/* Ensure any Bootstrap modal appears above hunt feed when hunt feed is active */
.hunt-feed.active ~ .modal,
.hunt-feed.active + .modal,
body.hunt-feed-active .modal {
    z-index: 10001 !important;
}

.hunt-feed.active ~ .modal-backdrop,
.hunt-feed.active + .modal-backdrop,
body.hunt-feed-active .modal-backdrop {
    z-index: 10000 !important;
}

/* State context styling for hunt feed header */
#current-unit-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    color: white;
    text-align: center;
}

#current-unit-name .unit-id {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

#current-unit-name .state-context {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.8;
    margin-top: 2px;
}

/* Bottom Navigation - Removed for swipe-only navigation */
.bottom-navigation {
    display: none !important;
}

.bottom-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 11px;
    font-weight: 600;
    padding: 12px;
    min-width: 72px;
    min-height: 56px;
    border-radius: 18px;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.bottom-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.bottom-nav-btn span {
    display: block;
    opacity: 0.8;
}

.bottom-nav-btn:hover,
.bottom-nav-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    outline: none;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.bottom-nav-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(0) scale(0.95);
}

.bottom-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.bottom-nav-btn.disabled:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Map button styling */
.bottom-nav-map {
    background: linear-gradient(135deg, var(--thingvalla-primary) 0%, var(--thingvalla-secondary) 100%);
    border-color: var(--thingvalla-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 87, 255, 0.4);
}

.bottom-nav-map:hover {
    background: linear-gradient(135deg, var(--thingvalla-secondary) 0%, var(--thingvalla-primary) 100%);
    box-shadow: 0 8px 24px rgba(0, 87, 255, 0.5);
}

/* Enhanced Touch Zones */
.tap-zone {
    position: absolute;
    top: 80px;
    bottom: 140px;
    width: 30%;
    z-index: 50;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.tap-zone:active {
    background: rgba(255, 255, 255, 0.05);
}

.tap-zone-left {
    left: 0;
}

.tap-zone-right {
    right: 0;
}

/* Modern Touch Hints */
.tap-hint {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tap-zone-left .tap-hint {
    left: 24px;
}

.tap-zone-right .tap-hint {
    right: 24px;
}

.tap-hint svg {
    width: 32px;
    height: 32px;
    color: white;
    opacity: 0.9;
}

/* Show hints for first-time users */
.tap-hint.show-hint {
    opacity: 0.8;
    animation: modern-pulse 3s ease-in-out infinite;
}

/* Enhanced Tap feedback animation */
.tap-hint.tap-feedback {
    opacity: 1;
    transform: translateY(-50%) scale(1.2);
    background: rgba(0, 87, 255, 0.3);
    border-color: var(--thingvalla-primary);
    box-shadow: 0 0 30px rgba(0, 87, 255, 0.6);
}

@keyframes modern-pulse {
    0% { 
        transform: translateY(-50%) scale(1); 
        opacity: 0.8;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    50% { 
        transform: translateY(-50%) scale(1.1); 
        opacity: 1;
        box-shadow: 0 8px 30px rgba(0, 87, 255, 0.4);
    }
    100% { 
        transform: translateY(-50%) scale(1); 
        opacity: 0.8;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
}

/* Modern Progress Indicator */
.progress-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-indicator.visible {
    opacity: 1;
}

/* Hide dots completely */
.progress-dots {
    display: none !important;
}

.progress-dot,
.progress-ellipsis {
    display: none !important;
}

.progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
    white-space: nowrap;
    text-align: center;
    line-height: 1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Modern Image Loading Overlay */
.image-loading-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
}

.image-loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.image-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid var(--thingvalla-primary);
    border-right: 3px solid var(--thingvalla-secondary);
    border-radius: 50%;
    animation: modern-spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes modern-spin {
    0% { 
        transform: rotate(0deg) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
    100% { 
        transform: rotate(360deg) scale(1);
        opacity: 0.8;
    }
}

/* Pull to Refresh Animation */
@keyframes pull-refresh {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translateY(0) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translateY(0) rotate(360deg);
        opacity: 0.8;
    }
}

.pull-refresh-indicator {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    transition: all 0.3s ease;
}

.pull-refresh-indicator.visible {
    opacity: 1;
    animation: pull-refresh 1.5s ease-in-out infinite;
}

.pull-refresh-indicator svg {
    width: 32px;
    height: 32px;
    color: var(--thingvalla-primary);
    filter: drop-shadow(0 2px 8px rgba(0, 87, 255, 0.4));
}

/* Image Zoom Capabilities */
.image-wrapper.zoom-enabled {
    cursor: zoom-in;
}

.image-wrapper.zoomed {
    cursor: zoom-out;
    z-index: 1000;
}

.image-wrapper.zoomed img {
    transform: scale(2) translate(var(--zoom-x, 0), var(--zoom-y, 0));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image transition animations */
.image-wrapper.transitioning {
    transform: scale(0.95);
    opacity: 0.7;
}

.image-wrapper.entering {
    animation: image-enter 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes image-enter {
    0% {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Micro-interactions */
.image-wrapper:active {
    transform: scale(0.98);
}

.action-btn:active {
    transform: scale(0.9);
}

/* Smooth scroll snap for feed browsing */
.hunt-feed-content {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.image-container {
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

/* Hide old navigation on mobile when new navigation is present */
.hunt-feed.mobile .image-navigation {
    display: none;
}

/* Full height content area without bottom navigation */
.hunt-feed-content {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Larger touch targets for older users */
@media (max-width: 768px) {
    .bottom-navigation {
        height: 70px;
    }
    
    .bottom-nav-btn {
        min-height: 60px;
        font-size: 13px;
    }
    
    .bottom-nav-btn svg {
        width: 28px;
        height: 28px;
    }
    
    .tap-zone {
        width: 30%;
        bottom: 130px;
    }
    
    .progress-indicator {
        bottom: 90px;
    }
    
    .progress-text {
        font-size: 13px;
        padding: 6px 14px;
        font-weight: 500;
    }
    
    .hunt-feed-content {
        margin-bottom: 70px;
    }
    
    /* Hide duplicate counter in header on mobile */
    #image-counter {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Ensure header title takes full width when counter is hidden */
    .hunt-feed-title {
        flex-direction: column;
        gap: 0;
    }
    
    .hunt-feed-title span:first-child {
        font-size: 16px;
        font-weight: 600;
    }
}

/* Focus states for accessibility */
.bottom-nav-btn:focus,
.tap-zone:focus {
    outline: 2px solid #0057ff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bottom-navigation {
        border-top: 2px solid white;
    }
    
    .bottom-nav-btn {
        color: white;
    }
    
    .progress-dot {
        border: 1px solid white;
    }
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .hunt-feed.mobile .image-info {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        transform: none !important;
        width: 100% !important;
        max-width: none !important;
        padding: 16px !important;
        margin: 0 !important;
        background: linear-gradient(0deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%) !important;
        border-radius: 0 !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        border: none !important;
        z-index: 10 !important;
    }
    
    .hunt-feed.mobile .image-container {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        height: 100vh !important;
    }
    
    .hunt-feed.mobile .hunt-feed-content {
        padding-bottom: 0 !important;
    }
}

/* Swipe gesture transitions and animations */
.hunt-feed {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hunt-feed.sliding-down {
    animation: slideDown 0.3s ease-out forwards;
}

.hunt-feed.sliding-up {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Visual feedback for swipe gestures */
.swipe-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    animation: fadeInOut 0.6s ease-out;
    z-index: 10000;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Elastic overscroll effect */
.hunt-feed-content {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hunt-feed-content.overscroll-top {
    transform: translateY(10px);
}

.hunt-feed-content.overscroll-bottom {
    transform: translateY(-10px);
}

/* Image type badge styling */
.animal-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Category badge for image type */
.image-type-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
}

/* Rank highlight badge for trophy markers */
.rank-highlight-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    padding: 8px 16px;
    border-radius: 24px;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    animation: badgeSlideIn 0.5s ease-out;
    transition: opacity 0.3s ease;
}

@keyframes badgeSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Mobile adjustments for rank badge */
@media (max-width: 768px) {
    .rank-highlight-badge {
        top: 70px;
        right: 16px;
        font-size: 16px;
        padding: 6px 14px;
    }
}
