/* Forest Green Theme */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c59;
    --light-green: #6b8e23;
    --accent-green: #90ee90;
    --dark-green: #1a3d14;
    --success-green: #198754;
    --warning-amber: #ffc107;
    --danger-red: #dc3545;
    --light-gray: #f8f9fa;
    --dark-gray: #6c757d;
}

body {
    background-color: #f5f5f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navbar Styling */
.navbar {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green)) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* Card Styling */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border-bottom: none;
}

/* Button Styling */
.btn-success {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

.btn-success:hover {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.btn-outline-success {
    color: var(--success-green);
    border-color: var(--success-green);
}

.btn-outline-success:hover {
    background-color: var(--success-green);
    border-color: var(--success-green);
}

/* Upload Area Styling */
.upload-area {
    border: 2px dashed var(--dark-gray);
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    background-color: var(--light-gray);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--success-green);
    background-color: rgba(25, 135, 84, 0.05);
}

.upload-area.dragover {
    border-color: var(--success-green);
    background-color: rgba(25, 135, 84, 0.1);
    transform: scale(1.02);
}

.upload-content {
    pointer-events: auto;
}



/* Swipe Card Styling */
.swipe-card {
    cursor: default;
    transition: box-shadow 0.3s ease;
    border: 2px solid #dee2e6;
}

/* Ensure the card doesn't look clickable */
#swipeCard {
    cursor: default !important;
    user-select: none;
}

#swipeCard * {
    cursor: default;
}

#swipeCard button,
#swipeCard textarea,
#swipeCard label {
    cursor: pointer;
}

.swipe-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 15px 15px;
}

.swipe-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.swipe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 50%, rgba(0,0,0,0.3) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.swipe-info {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.swipe-btn {
    min-width: 120px;
    transition: all 0.3s ease;
}

.swipe-btn:hover {
    transform: scale(1.05);
}

/* Progress Bar Styling */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Alert Styling */
.alert {
    border-radius: 10px;
    border: none;
}

/* Persistent alerts that don't auto-hide */
.alert.no-auto-hide {
    border-left: 4px solid #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.alert.no-auto-hide.alert-warning {
    border-left-color: #ffc107;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
}

.alert.no-auto-hide.alert-info {
    border-left-color: #0dcaf0;
    box-shadow: 0 2px 8px rgba(13, 202, 240, 0.15);
}

/* Footer Styling */
.footer {
    background-color: var(--primary-green);
    color: white;
    margin-top: auto;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .swipe-image {
        height: 300px;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .upload-area {
        padding: 20px 15px;
    }
    
    .swipe-btn {
        min-width: 100px;
        font-size: 0.8rem;
    }
    
    /* Mobile Analysis Prompt */
    .analysis-prompt-card {
        margin-bottom: 2rem;
    }
    
    .analysis-prompt-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .analysis-prompt-card h3 {
        font-size: 1.5rem;
    }
    
    .analysis-prompt-card .lead {
        font-size: 1.1rem;
    }
    
    .analysis-btn {
        min-width: 120px;
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    /* Make stats cards more prominent on mobile */
    .card.bg-warning,
    .card.bg-danger,
    .card.bg-success {
        margin-bottom: 1rem;
    }
    
    .card.bg-warning .fa-2x,
    .card.bg-danger .fa-2x,
    .card.bg-success .fa-2x {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .swipe-image {
        height: 250px;
    }
    
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

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

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

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

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Image Gallery Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.photo-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.photo-card:hover {
    transform: scale(1.02);
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-card:hover .photo-overlay {
    transform: translateY(0);
}

/* Status Badges */
.status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-unchecked {
    background-color: var(--warning-amber);
    color: #000;
}

.status-tick {
    background-color: var(--danger-red);
    color: white;
}

.status-no-tick {
    background-color: var(--success-green);
    color: white;
}

/* Analysis Prompt Card */
.analysis-prompt-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--primary-green) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    animation: pulse-glow 2s infinite;
}

.analysis-prompt-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.analysis-btn {
    min-width: 150px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.analysis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
    50% { box-shadow: 0 4px 20px rgba(25, 135, 84, 0.3); }
}

/* Splash Screen Styles */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2C5F2D 0%, #1a3f1c 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.splash-content {
    text-align: center;
    color: white;
    animation: splashFadeIn 1s ease-out;
}

.splash-logo {
    margin-bottom: 20px;
    animation: logoFloat 2s ease-in-out infinite;
}

.splash-logo svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.splash-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: titleSlideIn 1s ease-out 0.3s both;
}

.splash-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: subtitleSlideIn 1s ease-out 0.6s both;
}

.splash-loader {
    display: flex;
    justify-content: center;
    gap: 8px;
    animation: loaderFadeIn 1s ease-out 0.9s both;
}

.loader-dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite both;
}

.loader-dot:nth-child(1) { animation-delay: -0.32s; }
.loader-dot:nth-child(2) { animation-delay: -0.16s; }
.loader-dot:nth-child(3) { animation-delay: 0s; }

.main-content {
    transition: all 0.6s ease-out;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .splash-title {
        font-size: 2rem;
    }
    
    .splash-subtitle {
        font-size: 1rem;
    }
    
    .splash-logo svg {
        width: 100px;
        height: 100px;
    }
}

/* Splash Screen Animations */
@keyframes splashFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes subtitleSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 0.9;
        transform: translateY(0);
    }
}

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

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Leaderboard Styles */
.stat-item {
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2C5F2D;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.leaderboard-item.current-user {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-left-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.rank-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 0%, #e5e5e5 100%);
    color: #495057;
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #daa520 100%);
    color: #8b4513;
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-badge:not(.rank-1):not(.rank-2):not(.rank-3) {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    color: white;
    font-size: 0.9rem;
}

.leader-info {
    flex-grow: 1;
}

.leader-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 2px;
}

.leader-stats {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Mobile optimizations for leaderboard */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .leaderboard-item {
        padding: 10px 12px;
    }
    
    .rank-badge {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-right: 12px;
    }
    
    .leader-name {
        font-size: 1rem;
    }
    
    .leader-stats {
        font-size: 0.8rem;
    }
}

/* Trophy icon in navigation */
.navbar-nav .nav-link .fa-trophy {
    color: #ffd700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover .fa-trophy {
    color: #ffed4e;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.navbar-nav .nav-link:hover {
    color: #ffed4e !important;
}


