/* GeoGuessr Learning Assistant - Styles */

.nav-link.active {
    background-color: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.nav-dropdown-toggle svg {
    transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 0.5rem;
    min-width: 12rem;
    z-index: 100;
    pointer-events: none;
    display: none;
}

.nav-dropdown-menu-inner {
    background-color: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

.nav-dropdown.open .nav-dropdown-menu-inner {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown.open .nav-dropdown-menu {
    pointer-events: auto;
    display: block;
}

.nav-dropdown-menu-inner a {
    display: block;
    padding: 0.625rem 1rem;
    color: #d1d5db;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.15s;
}

.nav-dropdown-menu-inner a:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.nav-dropdown-menu-inner a:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.nav-dropdown-menu-inner a:hover {
    background-color: #374151;
    color: #fff;
}

.nav-dropdown-menu-inner a.active {
    background-color: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.page {
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Session cards */
.session-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

/* Session thumbnails */
.session-thumbnail-container {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #1f2937;
}

.session-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.session-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #4b5563;
    background: #1f2937;
}

.session-thumbnail-placeholder.fetch-screenshot-btn {
    cursor: pointer;
    transition: all 0.2s ease;
    color: #60a5fa;
}

.session-thumbnail-placeholder.fetch-screenshot-btn:hover {
    background: #374151;
    color: #93c5fd;
    transform: scale(1.05);
}

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

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Clue categories */
.clue-category {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.clue-category.language { background: #3b82f6; }
.clue-category.road { background: #10b981; }
.clue-category.meta { background: #f59e0b; }
.clue-category.vehicle { background: #ef4444; }
.clue-category.environment { background: #22c55e; }
.clue-category.architecture { background: #8b5cf6; }
.clue-category.specific { background: #ec4899; }
.clue-category.roads { background: #10b981; }
.clue-category.coverage { background: #f59e0b; }
.clue-category.plates { background: #06b6d4; }
.clue-category.infrastructure { background: #84cc16; }
.clue-category.nature { background: #14b8a6; }

/* Loading spinner */
.spinner {
    border: 3px solid #374151;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* World map container */
#world-map {
    background: #1a1a2e;
    border-radius: 8px;
}

/* Leaflet dark mode overrides */
.leaflet-container {
    background: #1a1a2e;
}

.leaflet-control-attribution {
    background: rgba(26, 26, 46, 0.8) !important;
    color: #6b7280 !important;
}

.leaflet-control-attribution a {
    color: #9ca3af !important;
}

/* Trainer cards */
.trainer-card {
    transition: transform 0.2s;
}

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

/* Wiki country cards */
.wiki-country-card {
    transition: transform 0.2s, border-color 0.2s;
}

.wiki-country-card:hover {
    transform: translateY(-2px);
    border-color: #6366f1;
}

/* Difficulty badges */
.difficulty-easy { background: #065f46; color: #6ee7b7; }
.difficulty-medium { background: #78350f; color: #fcd34d; }
.difficulty-hard { background: #7f1d1d; color: #fca5a5; }
.difficulty-expert { background: #581c87; color: #d8b4fe; }

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: #10b981;
    color: white;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.toast.error {
    background: #ef4444;
}

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

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

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

/* Progress bars */
.progress-bar {
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Chart containers */
canvas {
    max-width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-link span {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Comparison view */
.comparison-column {
    border-right: 1px solid #374151;
}

.comparison-column:last-child {
    border-right: none;
}

/* Knowledge entries */
.knowledge-entry {
    transition: background 0.2s;
}

.knowledge-entry:hover {
    background: #374151;
}

/* Export buttons */
.export-btn {
    transition: background 0.2s;
}

.export-btn:hover {
    background: #4b5563;
}

/* Prediction cards */
.prediction-card {
    border-left: 3px solid #6366f1;
}

/* Calibration bars */
.calibration-good { color: #10b981; }
.calibration-warning { color: #f59e0b; }
.calibration-bad { color: #ef4444; }
