/* Custom CSS for Hidden Treasure Hunt */

/* Root variables */
:root {
    --treasure-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --info-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --purple-gradient: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* Global styles */
body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Card styles */
.card-treasure {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-treasure:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Button styles */
.btn-treasure {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-treasure-primary {
    background: var(--treasure-gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.3);
}

.btn-treasure-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.4);
}

.btn-treasure-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-treasure-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

/* Progress bars */
.progress-treasure {
    background: #f3f4f6;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
}

.progress-treasure-bar {
    height: 100%;
    background: var(--treasure-gradient);
    transition: width 1s ease-out;
    border-radius: 999px;
}

/* Badges */
.badge-treasure {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-treasure-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-treasure-green {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-treasure-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
}

/* Stat cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--treasure-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

/* Enigme cards */
.enigme-card {
    transition: all 0.3s ease;
}

.enigme-card:hover .enigme-icon {
    transform: rotate(15deg) scale(1.1);
}

.enigme-icon {
    transition: transform 0.3s ease;
}

/* Status indicators */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator-active {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.status-indicator-pending {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

.status-indicator-expired {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

/* City markers on map */
.city-marker {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 999px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.city-marker:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-xl);
}

.city-marker-active {
    background: var(--treasure-gradient);
    color: white;
}

/* Timeline */
.timeline-connector {
    position: absolute;
    left: 15px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item:last-child .timeline-connector {
    display: none;
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 4px solid #f3f4f6;
    position: relative;
    z-index: 1;
}

.timeline-dot-success {
    background: var(--success-gradient);
    color: white;
    border: 4px solid rgba(16, 185, 129, 0.2);
}

/* Floating labels */
.form-floating {
    position: relative;
}

.form-floating input,
.form-floating textarea {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1rem 0.75rem;
    pointer-events: none;
    transform-origin: 0 0;
    transition: all 0.1s ease-in-out;
    color: #6b7280;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:focus ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #f59e0b;
}

/* Treasure hunt specific animations */
@keyframes treasure-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(245, 158, 11, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
    }
}

.treasure-pulse {
    animation: treasure-pulse 2s infinite;
}

@keyframes treasure-shine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.treasure-shine {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: treasure-shine 3s infinite linear;
}

/* Hero patterns */
.hero-pattern {
    background-color: #fef3c7;
    background-image: 
        radial-gradient(circle at 25px 25px, #f59e0b 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, #f59e0b 2%, transparent 0%);
    background-size: 100px 100px;
}

/* Dashboard specific styles */
.dashboard-title {
    font-family: 'Playfair Display', serif;
    position: relative;
    display: inline-block;
}

.dashboard-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--treasure-gradient);
    border-radius: 999px;
}

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

::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Toast notifications */
.toast-treasure {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

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

.toast-treasure-success {
    border-left: 4px solid #10b981;
}

.toast-treasure-error {
    border-left: 4px solid #ef4444;
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .btn-treasure {
        padding: 0.625rem 1.25rem;
    }
    
    .card-treasure {
        border-radius: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #111827;
        color: #f3f4f6;
    }
    
    .card-treasure {
        background: #1f2937;
    }
    
    .btn-treasure-secondary {
        background: #374151;
        color: #f3f4f6;
        border-color: #4b5563;
    }
    
    .progress-treasure {
        background: #374151;
    }
}
