/* ================================
   LUMANOV - Etkinlik Haritası
   Premium Glassmorphism Tasarım
   ================================ */

/* CSS Variables */
:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #5A4BD1;
    --accent: #00CEC9;
    --accent-light: #81ECEC;
    --bg-dark: #0F0F1A;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-glass: rgba(255, 255, 255, 0.12);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --border-glass: rgba(255, 255, 255, 0.15);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.3);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ================================
   Harita
   ================================ */
#map {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Leaflet özel stilleri */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.leaflet-control-zoom a {
    background: rgba(15, 15, 26, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-glass) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 18px !important;
    transition: var(--transition);
}

.leaflet-control-zoom a:hover {
    background: rgba(108, 92, 231, 0.6) !important;
    color: white !important;
}

.leaflet-control-zoom-in {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}

.leaflet-control-zoom-out {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
}

/* ================================
   Marka Badge
   ================================ */
.brand-badge {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    cursor: default;
    transition: var(--transition);
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-badge:hover {
    background: rgba(15, 15, 26, 0.9);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.brand-icon {
    font-size: 24px;
    animation: pulse 2s infinite;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ================================
   Etkinlik Sayacı
   ================================ */
.event-counter {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 15, 26, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 10px 16px;
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

.counter-icon {
    font-size: 18px;
}

.counter-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

#eventCount {
    color: var(--accent);
    font-weight: 700;
}

/* ================================
   Modal Overlay
   ================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================================
   Modal Container
   ================================ */
.modal-container {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), var(--shadow-glow);
}

.modal-overlay.active .modal-container {
    transform: translateY(0) scale(1);
}

/* Scrollbar */
.modal-container::-webkit-scrollbar {
    width: 6px;
}

.modal-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

/* ================================
   Modal Header
   ================================ */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-icon {
    font-size: 32px;
    animation: float 3s ease-in-out infinite;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255, 70, 70, 0.2);
    border-color: rgba(255, 70, 70, 0.4);
    color: #ff4646;
    transform: rotate(90deg);
}

/* ================================
   Form Styles
   ================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.label-icon {
    font-size: 16px;
}

.label-optional {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

input[type="text"],
textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

input[type="text"]::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(108, 92, 231, 0.08);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* ================================
   Dosya Yükleme Alanı
   ================================ */
.file-upload-area {
    position: relative;
    border: 2px dashed var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--primary-light);
    background: rgba(108, 92, 231, 0.06);
}

.file-upload-area.dragover {
    border-color: var(--accent);
    background: rgba(0, 206, 201, 0.08);
    transform: scale(1.01);
}

.file-upload-area.has-file {
    padding: 0;
    border-style: solid;
    border-color: var(--primary);
}

.file-upload-content {
    transition: var(--transition);
}

.upload-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.file-upload-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.photo-preview {
    display: none;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 2px);
}

.file-upload-area.has-file .photo-preview {
    display: block;
}

.file-upload-area.has-file .file-upload-content {
    display: none;
}

.remove-photo {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(255, 70, 70, 0.85);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    align-items: center;
    justify-content: center;
}

.file-upload-area.has-file .remove-photo {
    display: flex;
}

.remove-photo:hover {
    background: rgba(255, 70, 70, 1);
    transform: scale(1.1);
}

/* ================================
   Konum Bilgisi
   ================================ */
.location-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(0, 206, 201, 0.08);
    border: 1px solid rgba(0, 206, 201, 0.2);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--accent);
}

/* ================================
   Submit Button
   ================================ */
.btn-submit {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 4px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit.loading .btn-text {
    display: none;
}

.btn-loading {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit.loading .btn-loading {
    display: flex;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ================================
   Detay Modal
   ================================ */
.detail-modal {
    padding: 0;
    overflow: hidden;
}

.detail-photo {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
}

.detail-body {
    padding: 24px 28px 28px;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.detail-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.detail-no-photo {
    padding-top: 28px;
}

/* ================================
   Toast Bildirimi
   ================================ */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 206, 201, 0.3);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 20px;
}

/* ================================
   Özel Pin İkonu
   ================================ */
.custom-pin {
    position: relative;
}

.custom-pin .pin-marker {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    animation: dropIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-pin .pin-marker:hover {
    transform: rotate(-45deg) scale(1.15);
    box-shadow: 0 6px 24px rgba(108, 92, 231, 0.6);
}

.custom-pin .pin-inner {
    transform: rotate(45deg);
    font-size: 16px;
}

.temp-pin .pin-marker {
    background: linear-gradient(135deg, #FD79A8, #E84393);
    animation: pulse-pin 1.5s infinite;
}

/* Leaflet popup özelleştirme */
.leaflet-popup-content-wrapper {
    background: rgba(20, 20, 35, 0.95) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
    color: var(--text-primary) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-tip {
    background: rgba(20, 20, 35, 0.95) !important;
    border: 1px solid var(--border-glass) !important;
}

.popup-card {
    padding: 14px 16px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 180px;
}

.popup-card:hover {
    background: rgba(108, 92, 231, 0.1);
}

.popup-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.popup-desc {
    font-size: 12px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popup-hint {
    font-size: 10px;
    color: var(--primary-light);
    margin-top: 8px;
    font-weight: 500;
}

/* Leaflet popup close button */
.leaflet-popup-close-button {
    color: var(--text-muted) !important;
    font-size: 20px !important;
    padding: 4px 8px !important;
}

.leaflet-popup-close-button:hover {
    color: var(--text-primary) !important;
}

/* ================================
   Animasyonlar
   ================================ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

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

@keyframes dropIn {
    from {
        opacity: 0;
        transform: rotate(-45deg) translateY(-20px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: rotate(-45deg) translateY(0) scale(1);
    }
}

@keyframes pulse-pin {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(232, 67, 147, 0.4);
    }
    50% {
        box-shadow: 0 4px 32px rgba(232, 67, 147, 0.7);
    }
}

/* ================================
   Responsive
   ================================ */
@media (max-width: 480px) {
    .brand-badge {
        top: 12px;
        left: 12px;
        padding: 8px 12px;
    }

    .brand-name {
        font-size: 15px;
    }

    .brand-tagline {
        font-size: 10px;
    }

    .event-counter {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
    }

    .modal-container {
        width: 95%;
        padding: 20px;
        max-height: 85vh;
        border-radius: var(--radius-lg);
    }

    .modal-header h2 {
        font-size: 18px;
    }
}

/* Leaflet attributions */
.leaflet-control-attribution {
    background: rgba(15, 15, 26, 0.7) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: var(--text-muted) !important;
    font-size: 10px !important;
    border: none !important;
}

.leaflet-control-attribution a {
    color: var(--primary-light) !important;
}
