/* ================================================================
   VIZYON PLACE ATLAS — TASARIM SİSTEMİ
   Tamamen bağımsız, sadece atlas.html tarafından kullanılır.
   ================================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
    --atlas-bg: #0a0a0f;
    --atlas-surface: rgba(15, 15, 25, 0.85);
    --atlas-surface-hover: rgba(25, 25, 40, 0.9);
    --atlas-accent: #8b5cf6;
    --atlas-accent-glow: rgba(139, 92, 246, 0.3);
    --atlas-cyan: #06b6d4;
    --atlas-cyan-glow: rgba(6, 182, 212, 0.25);
    --atlas-border: rgba(255, 255, 255, 0.08);
    --atlas-border-hover: rgba(255, 255, 255, 0.2);
    --atlas-text: #f0f0f5;
    --atlas-text-muted: #8888a0;
    --atlas-text-dim: #555570;
    --atlas-danger: #ef4444;
    --atlas-danger-glow: rgba(239, 68, 68, 0.3);
    --atlas-success: #22c55e;
    --atlas-success-glow: rgba(34, 197, 94, 0.3);
    --atlas-radius-sm: 10px;
    --atlas-radius-md: 16px;
    --atlas-radius-lg: 20px;
    --atlas-radius-xl: 24px;
    --atlas-blur: blur(20px) saturate(180%);
    --atlas-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    --atlas-shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.4);
    --atlas-transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--atlas-bg);
    color: var(--atlas-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- YÜKLEME EKRANI --- */
#atlas-loading {
    position: fixed;
    inset: 0;
    background: var(--atlas-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition: opacity 0.6s ease-out;
}

#atlas-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.atlas-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--atlas-border);
    border-top-color: var(--atlas-accent);
    border-radius: 50%;
    animation: atlas-spin 0.8s linear infinite;
}

#atlas-loading h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--atlas-text-muted);
    letter-spacing: 0.3px;
}

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

/* --- CANVAS --- */
#atlasCanvas {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    background: var(--atlas-bg);
}

#atlasCanvas:active {
    cursor: grabbing;
}

#atlasCanvas.drawing-mode {
    cursor: crosshair;
}

/* --- KONUM GÖSTERGESİ --- */
#atlas-position {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 50;
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    color: var(--atlas-text-muted);
    letter-spacing: 0.5px;
    box-shadow: var(--atlas-shadow-sm);
    user-select: none;
}

/* --- ARAMA KUTUSU --- */
#atlas-search-bar {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#atlas-search {
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: 14px;
    padding: 12px 20px;
    color: var(--atlas-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    width: 280px;
    transition: all var(--atlas-transition);
    outline: none;
}

#atlas-search::placeholder {
    color: var(--atlas-text-dim);
}

#atlas-search:focus {
    border-color: var(--atlas-accent);
    box-shadow: 0 0 20px var(--atlas-accent-glow);
    width: 320px;
}

/* Arama Sonuçları Dropdown */
#atlas-search-results {
    display: none;
    position: relative;
    z-index: 310;
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-md);
    max-height: 260px;
    overflow-y: auto;
    width: 320px; /* Arama çubuğunun açık halindeki genişliği ile aynı */
    box-shadow: var(--atlas-shadow);
}

#atlas-search-results.visible {
    display: block;
}

.atlas-search-item {
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 1px solid var(--atlas-border);
    transition: background var(--atlas-transition);
    font-size: 14px;
}

.atlas-search-item:last-child {
    border-bottom: none;
}

.atlas-search-item:hover {
    background: var(--atlas-surface-hover);
}

.atlas-search-item-title {
    font-weight: 600;
    color: var(--atlas-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.atlas-search-item-authors {
    font-size: 12px;
    color: var(--atlas-text-dim);
    margin-top: 2px;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar */
#atlas-search-results::-webkit-scrollbar {
    width: 4px;
}

#atlas-search-results::-webkit-scrollbar-thumb {
    background: var(--atlas-text-dim);
    border-radius: 2px;
}

/* --- OVERLAY TOGGLE BUTONU --- */
#atlas-toggle-overlay, #atlas-reset-view, #atlas-watch-history {
    position: fixed;
    top: 20px;
    background: var(--atlas-surface);
    border: 1px solid var(--atlas-border);
    color: var(--atlas-text);
    padding: 8px;
    border-radius: var(--atlas-radius-md);
    cursor: pointer;
    z-index: 50;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    transition: all 0.2s;
}

#atlas-toggle-overlay {
    top: 68px;
    right: 70px;
    left: auto;
}

#atlas-watch-history {
    top: 68px;
    right: 120px;
    left: auto;
}

#atlas-reset-view {
    top: 68px;
    right: 20px;
    left: auto;
}

#atlas-toggle-overlay:hover, #atlas-reset-view:hover, #atlas-watch-history:hover {
    background: var(--atlas-surface-hover);
    transform: translateY(-2px);
}

#atlas-toggle-overlay.active {
    background: var(--atlas-primary);
    border-color: var(--atlas-primary);
    color: var(--atlas-accent);
}

/* --- ADMIN BUTONU --- */
#atlas-admin-btn {
    position: fixed;
    top: 68px;
    right: 20px;
    z-index: 50;
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-sm);
    padding: 10px 18px;
    color: var(--atlas-text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--atlas-transition);
    letter-spacing: 0.3px;
}

#atlas-admin-btn:hover {
    background: var(--atlas-surface-hover);
    border-color: var(--atlas-border-hover);
    color: var(--atlas-text);
    transform: translateY(-1px);
    box-shadow: var(--atlas-shadow-sm);
}

/* --- BİLGİ PANELİ (GLASSMORPHISM) --- */
#atlas-info-panel {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 380px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-xl);
    padding: 28px;
    box-shadow: var(--atlas-shadow);
    z-index: 100;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#atlas-info-panel.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

#atlas-info-panel::-webkit-scrollbar {
    width: 4px;
}

#atlas-info-panel::-webkit-scrollbar-thumb {
    background: var(--atlas-text-dim);
    border-radius: 2px;
}

#atlas-info-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--atlas-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--atlas-text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--atlas-transition);
    line-height: 1;
}

#atlas-info-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--atlas-text);
    transform: rotate(90deg);
}

#atlas-info-focus {
    position: absolute;
    top: 16px;
    right: 56px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--atlas-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--atlas-text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--atlas-transition);
    line-height: 1;
}

#atlas-info-focus:hover {
    background: rgba(6, 182, 212, 0.15);
    color: var(--atlas-text);
    border-color: var(--atlas-cyan);
    transform: scale(1.1);
}

#atlas-info-share {
    position: absolute;
    top: 16px;
    right: 96px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--atlas-border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--atlas-text-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--atlas-transition);
    line-height: 1;
}

#atlas-info-share:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--atlas-text);
    border-color: var(--atlas-purple);
    transform: scale(1.1);
}

#atlas-info-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--atlas-text);
    margin-bottom: 12px;
    padding-right: 90px;
    line-height: 1.3;
}

#atlas-info-desc {
    font-size: 14px;
    line-height: 1.7;
    color: var(--atlas-text-muted);
    margin-bottom: 16px;
}

#atlas-info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--atlas-cyan);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: var(--atlas-radius-sm);
    transition: all var(--atlas-transition);
    margin-bottom: 16px;
}

#atlas-info-link:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateX(2px);
}

#atlas-info-link:empty {
    display: none;
}

#atlas-info-authors {
    font-size: 13px;
    font-style: italic;
    color: var(--atlas-accent);
    border-top: 1px solid var(--atlas-border);
    padding-top: 14px;
    line-height: 1.5;
}

#atlas-info-authors:empty {
    display: none;
}

/* Admin düzenle/sil butonları — info panel içinde */
.atlas-info-admin-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--atlas-border);
}

.atlas-info-admin-actions button {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--atlas-transition);
}

#atlas-edit-btn {
    background: rgba(139, 92, 246, 0.1);
    color: var(--atlas-accent);
    border-color: rgba(139, 92, 246, 0.25);
}

#atlas-edit-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--atlas-accent);
}

#atlas-delete-btn {
    background: rgba(239, 68, 68, 0.08);
    color: var(--atlas-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

#atlas-delete-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: var(--atlas-danger);
}

/* --- ŞİFRE MODALI --- */
#atlas-password-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

#atlas-password-modal.visible {
    display: flex;
}

.atlas-modal-card {
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-xl);
    padding: 36px;
    width: 380px;
    max-width: 90vw;
    box-shadow: var(--atlas-shadow);
    animation: atlas-scale-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes atlas-scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.atlas-modal-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* Ortak Input Stili */
.atlas-modal-card input[type="text"],
.atlas-modal-card input[type="password"],
.atlas-modal-card input[type="url"],
.atlas-modal-card textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-sm);
    padding: 12px 16px;
    color: var(--atlas-text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: all var(--atlas-transition);
    margin-bottom: 12px;
}

.atlas-modal-card input:focus,
.atlas-modal-card textarea:focus {
    border-color: var(--atlas-accent);
    box-shadow: 0 0 15px var(--atlas-accent-glow);
}

.atlas-modal-card input::placeholder,
.atlas-modal-card textarea::placeholder {
    color: var(--atlas-text-dim);
}

.atlas-modal-card textarea {
    resize: vertical;
    min-height: 80px;
}

#atlas-password-error {
    color: var(--atlas-danger);
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    margin-bottom: 8px;
}

/* Ortak Buton Stili */
.atlas-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--atlas-accent), #7c3aed);
    color: white;
    border: none;
    border-radius: var(--atlas-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--atlas-transition);
    letter-spacing: 0.3px;
}

.atlas-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--atlas-accent-glow);
}

.atlas-btn-secondary {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--atlas-text-muted);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--atlas-transition);
}

.atlas-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--atlas-border-hover);
    color: var(--atlas-text);
}

/* --- ADMIN TOOLBAR --- */
#atlas-toolbar {
    position: fixed;
    top: 80px;
    right: 20px;
    left: auto;
    transform: translateX(150%);
    width: max-content;
    z-index: 200;
    background: var(--atlas-surface);
    backdrop-filter: var(--atlas-blur);
    -webkit-backdrop-filter: var(--atlas-blur);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-lg);
    padding: 15px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    box-shadow: var(--atlas-shadow);
    animation: atlas-slide-in-right 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#atlas-toolbar.visible {
    display: flex;
}

@keyframes atlas-slide-in-right {
    from {
        transform: translateX(150%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes atlas-slide-up {
    from {
        transform: translateX(-50%) translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

#atlas-toolbar button {
    padding: 10px 18px;
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--atlas-text-muted);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--atlas-transition);
    white-space: nowrap;
    flex-shrink: 0;
}

#atlas-toolbar button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--atlas-border-hover);
    color: var(--atlas-text);
    transform: translateY(-1px);
}

#atlas-toolbar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#atlas-toolbar button:active:not(:disabled) {
    transform: translateY(0);
}

/* Özel toolbar buton renkleri */
#atlas-draw-btn {
    background: rgba(139, 92, 246, 0.12) !important;
    border-color: rgba(139, 92, 246, 0.3) !important;
    color: var(--atlas-accent) !important;
}

#atlas-draw-btn:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.25) !important;
}

#atlas-draw-btn.active {
    background: var(--atlas-accent) !important;
    color: white !important;
    border-color: var(--atlas-accent) !important;
}

#atlas-select-btn {
    background: rgba(6, 182, 212, 0.1) !important;
    border-color: rgba(6, 182, 212, 0.25) !important;
    color: var(--atlas-cyan) !important;
}

#atlas-select-btn:hover:not(:disabled) {
    background: rgba(6, 182, 212, 0.2) !important;
}

#atlas-select-btn.active {
    background: var(--atlas-cyan) !important;
    color: white !important;
    border-color: var(--atlas-cyan) !important;
}

#atlas-add-part-btn {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.25) !important;
    color: var(--atlas-success) !important;
}

#atlas-add-part-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.2) !important;
}

#atlas-save-btn {
    background: rgba(34, 197, 94, 0.1) !important;
    border-color: rgba(34, 197, 94, 0.25) !important;
    color: var(--atlas-success) !important;
}

#atlas-save-btn:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.2) !important;
}

#atlas-cancel-draw-btn {
    background: rgba(239, 68, 68, 0.08) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: var(--atlas-danger) !important;
}

#atlas-cancel-draw-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.18) !important;
}

#atlas-exit-admin {
    margin-left: auto;
    background: rgba(239, 68, 68, 0.06) !important;
    border-color: rgba(239, 68, 68, 0.15) !important;
    color: var(--atlas-text-dim) !important;
}

#atlas-exit-admin:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.15) !important;
    color: var(--atlas-danger) !important;
}

#atlas-point-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--atlas-text-dim);
    padding: 0 8px;
    white-space: nowrap;
}

/* --- ESER GİRİŞ FORMU MODALI --- */
#atlas-entry-form {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
}

#atlas-entry-form.visible {
    display: flex;
}

.atlas-form-card {
    width: 440px;
}

.atlas-form-card h3 {
    margin-bottom: 24px;
}

.atlas-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.atlas-form-actions button {
    flex: 1;
}

/* --- TARİHÇE MODALI --- */
#atlas-history-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atlas-modal-content {
    background: var(--atlas-surface);
    border: 1px solid var(--atlas-border);
    border-radius: var(--atlas-radius-lg);
    padding: 24px;
    width: 95%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.atlas-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--atlas-text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
}
.atlas-modal-close:hover {
    color: white;
}

.atlas-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    margin-top: 16px;
}

.atlas-video-container iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
}

.atlas-history-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    margin-bottom: 20px;
}

.atlas-history-tabs button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--atlas-text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.atlas-history-tabs button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.atlas-history-tabs button.active {
    background: var(--atlas-purple);
    border-color: var(--atlas-purple);
    color: white;
}

/* =========================================================
   MOBİL UYUMLULUK
   ========================================================= */
@media (max-width: 768px) {

    /* Arama — Tam genişlik */
    #atlas-search-bar {
        top: 15px;
        left: 15px;
        right: 15px;
    }

    #atlas-search {
        width: 100%;
    }

    #atlas-search:focus {
        width: 100%;
    }

    /* Butonlar — Arama altında yan yana */
    #atlas-toggle-overlay, #atlas-reset-view, #atlas-watch-history {
        top: 68px;
    }
    
    #atlas-toggle-overlay {
        left: 15px;
        right: auto;
    }

    #atlas-watch-history {
        left: 65px;
        right: auto;
    }

    #atlas-reset-view {
        left: 115px;
        right: auto;
    }

    /* Konum — Üst orta */
    #atlas-position {
        top: 68px;
        right: 15px;
        left: auto;
        font-size: 12px;
        padding: 6px 14px;
    }

    /* Admin butonu — Sağ üst, konum altında */
    #atlas-admin-btn {
        top: 68px;
        right: 15px;
        bottom: auto;
        font-size: 12px;
        padding: 8px 12px;
    }

    /* Bilgi paneli — Alt drawer */
    #atlas-info-panel {
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 45vh;
        border-radius: var(--atlas-radius-xl) var(--atlas-radius-xl) 0 0;
        padding: 24px 20px;
        transform: translateY(100%);
        z-index: 250; /* Admin Toolbar'ın üstüne çıkması için */
    }

    #atlas-info-panel.visible {
        transform: translateY(0);
    }

    #atlas-info-title {
        font-size: 18px;
    }

    /* Admin toolbar — Mobil Alt Bar (İkonlar) */
    #atlas-toolbar {
        top: auto;
        bottom: 20px;
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        max-height: none;
        overflow-y: visible;
        flex-direction: row;
        width: max-content;
        max-width: 95vw;
        border-radius: var(--atlas-radius-xl);
        padding: 10px 15px;
        gap: 10px;
        animation: atlas-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        justify-content: center;
        flex-wrap: wrap;
    }

    #atlas-toolbar button span {
        display: block;
        font-size: 9px;
        font-weight: 500;
        color: var(--atlas-text-muted);
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        line-height: 1.1;
    }

    #atlas-toolbar button {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 6px;
        font-size: 20px;
        width: 56px;
        min-width: 0;
    }

    #atlas-toolbar.visible ~ #atlas-admin-btn {
        display: none;
    }

    /* Modal kartları — Mobil */
    .atlas-modal-card {
        width: 100%;
        max-width: 90vw;
        padding: 28px 20px;
        border-radius: var(--atlas-radius-lg);
    }

    .atlas-form-card {
        width: 100%;
        max-height: 85vh;
        overflow-y: auto;
    }
}

/* =========================================================
   YARDIMCI SINIFLAR
   ========================================================= */
.atlas-hidden {
    display: none !important;
}
