:root {
    --background: #1a1a1a;
    --sidebar-bg: #242424;
    --accent: #8c52ff;
    --accent-light: #a375ff;
    --gold: #ffd700;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--background);
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.upload-section {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border: 2px dashed var(--purple-light);
}

#map {
    height: 400px;
    margin-top: 20px;
    border: 2px solid var(--purple-primary);
}

.hidden {
    display: none;
}

#locationsList {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.location-item {
    background-color: rgba(140, 82, 255, 0.1);
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.location-item:hover {
    background-color: rgba(140, 82, 255, 0.15);
    border-color: var(--accent);
}

.location-item.selected {
    background-color: rgba(140, 82, 255, 0.2);
    border: 1px solid var(--gold);
}

.confidence {
    color: var(--gold-light);
    font-size: 0.9em;
}

.coordinates {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8em;
    margin-top: 4px;
}

.reasoning-section {
    margin-top: 20px;
    padding: 15px;
    background-color: rgba(138, 43, 226, 0.1);
    border-radius: 5px;
    border: 1px solid var(--purple-light);
}

.reasoning-section h3 {
    margin-top: 0;
    color: var(--gold-primary);
}

/* Custom Bootstrap Classes */
.btn-purple {
    background-color: var(--purple-primary);
    color: white;
    border: none;
}

.btn-purple:hover {
    background-color: var(--purple-light);
    color: white;
}

.text-purple {
    color: var(--purple-primary) !important;
}

.text-gold {
    color: var(--gold-primary) !important;
}

.border-purple {
    border-color: var(--purple-primary) !important;
}

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

#locationsList::-webkit-scrollbar-track {
    background: rgba(138, 43, 226, 0.1);
    border-radius: 4px;
}

#locationsList::-webkit-scrollbar-thumb {
    background: var(--purple-light);
    border-radius: 4px;
}

/* Form Controls */
.form-control:focus {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 0.25rem rgba(138, 43, 226, 0.25);
}

/* OpenLayers Popup Styling */
.ol-popup {
    background-color: var(--black-custom);
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid var(--purple-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 14px;
    max-width: 200px;
    color: white;
}

.ol-popup .location-name {
    color: var(--gold-primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.ol-popup .confidence-value {
    color: var(--purple-light);
}

/* Hide default OpenLayers attribution */
.ol-attribution {
    display: none;
}

.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    background-color: var(--sidebar-bg);
    padding: 2rem;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

.main-content {
    padding: 2rem;
    height: 100vh;
    overflow: hidden;
}

.map-container {
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.upload-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    margin-bottom: 1rem;
}

.upload-area {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16/9;
}

.image-preview-container {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--accent);
    top: 0;
    left: 0;
    z-index: 1;
}

.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.custom-file-upload {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 2px dashed var(--accent);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-file-upload:hover {
    border-color: var(--accent-light);
    background-color: rgba(140, 82, 255, 0.1);
}

.custom-file-upload i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.custom-file-upload span {
    color: var(--text-secondary);
    font-size: 1rem;
}

input[type="file"] {
    display: none;
}

.btn-accent {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-accent:hover {
    background-color: var(--accent-light);
    color: white;
}

.spinner {
    margin: 0 auto;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(140, 82, 255, 0.1);
    border-left-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--background);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.btn-close:hover {
    background: var(--accent);
}

.content-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.map-container {
    flex: 1;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.reasoning-container {
    background: var(--sidebar-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.reasoning-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.reasoning-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.btn-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.btn-toggle:hover {
    color: var(--accent);
}

.reasoning-content {
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
}

.locations-container {
    flex: 1;
    overflow-y: auto;
    margin-top: 1rem;
}

.error-container {
    text-align: center;
    padding: 2rem;
}

.error-box {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1rem;
}

.error-box i {
    color: #ff4444;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-box p {
    color: var(--text-primary);
    margin: 0;
}

.footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.creator {
    color: var(--accent);
    font-weight: 500;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(140, 82, 255, 0.3);
}

.logo i {
    font-size: 1.8rem;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.sidebar-header h3 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, var(--gold) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.key-objects-container {
    background: var(--sidebar-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.key-objects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.key-objects-content {
    padding: 1rem;
    display: block;
}

.categories-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.category-box {
    background: rgba(140, 82, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
}

.category-title {
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.object-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.object-count {
    background: var(--accent);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
} 