/* ============================================================
   MADENCİ TAKİP SİSTEMİ — MADEN TEMASI
   Karanlık yeraltı, altın-bakır vurgulu, modern & mobil uyumlu
   ============================================================ */

/* --- Google Fonts (opsiyonel, sistem fontlarına fallback) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   1. RESET & CSS DEĞİŞKENLERİ
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* --- Maden Teması Ana Renkler --- */
    --bg-deep: #0d1117;              /* en koyu arka plan - yeraltı */
    --bg-surface: #161b22;           /* kart / yüzey arka planı */
    --bg-elevated: #1c2333;          /* yükseltilmiş yüzey */
    --bg-glass: rgba(22, 27, 34, 0.85); /* cam efekti */

    --gold: #f0a500;                 /* altın - ana vurgu */
    --gold-light: #ffc107;
    --gold-dark: #b8860b;
    --copper: #c77d4a;              /* bakır - ikincil vurgu */
    --copper-light: #e8956a;
    --amber: #ff8c00;               /* kehribar - uyarı */
    --emerald: #00c853;             /* zümrüt - başarı/aktif */
    --ruby: #ff1744;                /* yakut - tehlike */
    --silver: #b0bec5;              /* gümüş - metin */
    --stone: #78909c;               /* taş - ikincil metin */
    --slate: #546e7a;               /* bar - kenarlıklar */

    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-muted: #5f6368;
    --border: #2a3441;
    --border-light: #3a4454;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 20px rgba(240, 165, 0, 0.15);
    --glow-gold: 0 0 12px rgba(240, 165, 0, 0.3);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   2. TEMEL STİLLER
   ============================================================ */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-deep);
    /* Yeraltı dokusu efekti */
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(240, 165, 0, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 85% 20%, rgba(199, 125, 74, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 15% 80%, rgba(240, 165, 0, 0.03) 0%, transparent 50%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    padding-bottom: 80px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar maden teması */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-dark), var(--copper));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

/* Selection */
::selection {
    background: rgba(240, 165, 0, 0.3);
    color: #fff;
}

/* ============================================================
   3. HEADER
   ============================================================ */
header {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    margin-bottom: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* Header üst çizgi - altın şerit */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--copper), var(--gold), var(--gold-dark));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Header arka plan parıltısı */
header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(240, 165, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
    animation: headerShine 8s ease-in-out infinite;
}

@keyframes headerShine {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10px, -5px); }
}

header h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

header h1::first-letter {
    background: linear-gradient(135deg, var(--gold), var(--copper-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    font-weight: 400;
}

.header-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* --- Butonlar --- */
.btn-edit, .btn-back, .btn-add, .btn-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
    color: var(--text-primary);
    padding: 13px 30px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.2px;
}

.btn-edit::before, .btn-back::before, .btn-add::before, .btn-map::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold-dark), var(--copper));
    opacity: 0;
    transition: opacity var(--transition);
    border-radius: var(--radius-xl);
}

.btn-edit:hover::before, .btn-back:hover::before, .btn-add:hover::before, .btn-map:hover::before {
    opacity: 0.12;
}

.btn-edit:hover, .btn-back:hover, .btn-add:hover, .btn-map:hover {
    transform: translateY(-2px);
    border-color: var(--gold-dark);
    box-shadow: var(--shadow-gold), var(--shadow-md);
    color: var(--gold-light);
}

.btn-edit:active, .btn-back:active, .btn-add:active, .btn-map:active {
    transform: translateY(0);
}

.btn-add {
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.15), rgba(0, 200, 83, 0.05));
    border-color: rgba(0, 200, 83, 0.3);
}

.btn-add:hover {
    border-color: var(--emerald);
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.2);
    color: var(--emerald);
}

.btn-map {
    background: linear-gradient(135deg, rgba(240, 165, 0, 0.1), rgba(240, 165, 0, 0.03));
    border-color: rgba(240, 165, 0, 0.3);
}

/* ============================================================
   4. GENEL HARİTA BÖLÜMÜ
   ============================================================ */
.overview-map-section {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.overview-map-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(240, 165, 0, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.map-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.overview-map-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border-light), var(--shadow-lg);
    line-height: 0;
    transition: all var(--transition);
}

.overview-map-container:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 0 0 1px var(--gold-dark), var(--shadow-gold), var(--shadow-lg);
}

.overview-map-image {
    width: 100%;
    height: auto;
    display: block;
    -webkit-user-select: none;
    user-select: none;
}

/* Harita işaretçileri */
.overview-marker {
    position: absolute;
    width: 36px;
    height: 36px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    animation: markerPulse 2.5s ease-in-out infinite;
}

.overview-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: rgba(240, 165, 0, 0.25);
    border-radius: 50%;
    animation: markerRipple 2.5s ease-out infinite;
}

.overview-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    background: var(--gold);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(240, 165, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.overview-marker-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1c2333, #2a3441);
    color: var(--gold-light);
    padding: 5px 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gold-dark);
    pointer-events: none;
    letter-spacing: 0.5px;
}

/* ============================================================
   5. MADENCİ KARTLARI (GRID)
   ============================================================ */
.miners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.miner-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

/* Kart üst çizgi efekti */
.miner-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-dark), var(--gold), var(--gold-dark), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

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

.miner-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg), var(--shadow-gold);
}

/* Madenci başlık */
.miner-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

/* Avatar - altın-bakır gradient */
.miner-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--copper));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(240, 165, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.miner-avatar.small {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.miner-name {
    flex: 1;
    min-width: 0;
}

.miner-name h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.miner-id {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Aktif durum rozeti */
.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 200, 83, 0.1);
    color: var(--emerald);
    padding: 8px 18px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid rgba(0, 200, 83, 0.25);
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--emerald);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.5);
}

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

/* ============================================================
   6. DETAY SATIRLARI
   ============================================================ */
.miner-details {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: all var(--transition);
}

.detail-row:hover {
    border-color: var(--border);
    background: rgba(28, 35, 51, 0.8);
}

.detail-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 165, 0, 0.08);
    border-radius: 10px;
}

.detail-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-word;
}

/* ============================================================
   7. KONUM DROPDOWN (AKORDİYON)
   ============================================================ */
.location-section {
    margin-top: 8px;
}

.location-dropdown {
    background: linear-gradient(135deg, #1a1f2e, #1c2333);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.location-dropdown:hover {
    border-color: var(--gold-dark);
    box-shadow: var(--shadow-gold);
}

.dropdown-toggle {
    display: none;
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition);
    -webkit-user-select: none;
    user-select: none;
}

.dropdown-header:hover {
    background: rgba(240, 165, 0, 0.05);
}

.dropdown-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.dropdown-icon {
    font-size: 1.3rem;
}

.dropdown-content {
    display: flex;
    flex-direction: column;
}

.dropdown-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-value {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dropdown-arrow {
    font-size: 0.85rem;
    color: var(--gold);
    transition: transform var(--transition);
}

.dropdown-toggle:checked + .dropdown-header .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(13, 17, 23, 0.5);
}

.dropdown-toggle:checked ~ .dropdown-details {
    max-height: 500px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.dropdown-item:last-of-type {
    border-bottom: none;
}

.item-icon {
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 165, 0, 0.08);
    border-radius: 8px;
}

.item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.item-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.item-value {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Dropdown içindeki mini harita */
.dropdown-map {
    padding: 14px;
    background: var(--bg-deep);
    border-bottom: 1px solid var(--border);
}

.map-container-view {
    position: relative;
    width: 100%;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    line-height: 0;
}

.map-container-view .map-image {
    max-width: 100%;
}

.map-marker-view {
    position: absolute;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: markerPulse 2.5s ease-in-out infinite;
}

.map-marker-view::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: rgba(240, 165, 0, 0.25);
    border-radius: 50%;
    animation: markerRipple 2.5s ease-out infinite;
}

.map-marker-view::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: var(--gold);
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(240, 165, 0, 0.5);
}

.map-marker-view .marker-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--gold-light);
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid var(--gold-dark);
    box-shadow: var(--shadow-sm);
}

.update-time {
    padding: 12px 18px;
    background: rgba(240, 165, 0, 0.05);
    color: var(--gold-light);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.update-icon {
    animation: rotate 2s linear infinite;
}

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

/* ============================================================
   8. MARKER ANİMASYONLARI
   ============================================================ */
@keyframes markerPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes markerRipple {
    0% {
        width: 18px;
        height: 18px;
        opacity: 0.7;
    }
    100% {
        width: 55px;
        height: 55px;
        opacity: 0;
    }
}

/* ============================================================
   9. EDİT SAYFASI STİLLERİ
   ============================================================ */
.add-miner-container {
    margin-bottom: 32px;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.edit-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
    transition: all var(--transition);
}

.edit-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

.edit-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.edit-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* --- Form Stilleri --- */
.edit-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row .form-group {
    min-width: 0;
}

.form-row .form-group input {
    width: 100%;
    min-width: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.label-icon {
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
    background: var(--bg-deep);
    color: var(--text-primary);
    box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(240, 165, 0, 0.1), var(--glow-gold);
    background: var(--bg-elevated);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23f0a500' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-group select option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* --- Harita Konumlandırma --- */
.map-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: crosshair;
    background: var(--bg-deep);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition);
    line-height: 0;
}

.map-container:hover {
    border-color: var(--gold);
    box-shadow: var(--glow-gold), var(--shadow-lg);
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    max-width: 100%;
}

.map-marker {
    position: absolute;
    width: 42px;
    height: 42px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
    animation: markerPulse 2.5s ease-in-out infinite;
}

.map-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: rgba(240, 165, 0, 0.25);
    border-radius: 50%;
    animation: markerRipple 2.5s ease-out infinite;
}

.map-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: var(--gold);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 16px rgba(240, 165, 0, 0.6), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.marker-label {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    color: var(--gold-light);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid var(--gold-dark);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    letter-spacing: 0.3px;
}

.map-hint {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

/* --- Harita Yükleme --- */
.map-upload-card {
    max-width: 800px;
    margin: 0 auto;
}

.current-map-preview {
    margin-bottom: 16px;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.preview-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

.current-map-img {
    width: 100%;
    max-width: 100%;
    max-height: 400px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    display: block;
}

input[type="file"] {
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

input[type="file"]:hover {
    border-color: var(--gold);
    background: rgba(240, 165, 0, 0.03);
    color: var(--text-primary);
}

input[type="file"]::file-selector-button {
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-surface));
    color: var(--gold-light);
    border: 1px solid var(--gold-dark);
    padding: 8px 18px;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-weight: 600;
    margin-right: 12px;
    transition: all var(--transition);
    font-family: inherit;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(240, 165, 0, 0.1);
}

/* --- Form Butonları --- */
.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.btn-save {
    flex: 1;
    background: linear-gradient(135deg, rgba(0, 200, 83, 0.2), rgba(0, 200, 83, 0.05));
    color: var(--emerald);
    padding: 14px 24px;
    border: 1px solid rgba(0, 200, 83, 0.4);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(0, 200, 83, 0.2), var(--shadow-md);
    background: rgba(0, 200, 83, 0.25);
}

.btn-delete {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.15), rgba(255, 23, 68, 0.03));
    color: var(--ruby);
    padding: 14px 24px;
    border: 1px solid rgba(255, 23, 68, 0.3);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(255, 23, 68, 0.2), var(--shadow-md);
    background: rgba(255, 23, 68, 0.2);
}

.btn-cancel {
    flex: 1;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    padding: 14px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-cancel:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-save:active,
.btn-delete:active,
.btn-cancel:active {
    transform: translateY(0);
}

/* ============================================================
   10. FOOTER
   ============================================================ */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(13, 17, 23, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    padding: 16px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

footer p::before {
    content: '⛏️ ';
}

/* ============================================================
   11. MOBİL UYUMLULUK — TABLET (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }

    header {
        padding: 24px 20px;
        border-radius: var(--radius-md);
    }

    header h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .header-buttons {
        flex-direction: column;
        width: 100%;
    }

    .header-buttons .btn-back,
    .header-buttons .btn-add,
    .header-buttons .btn-map,
    .btn-edit {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
    }

    .miners-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .edit-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .miner-card {
        padding: 22px;
    }

    .miner-header {
        flex-wrap: wrap;
    }

    .miner-avatar {
        width: 54px;
        height: 54px;
        font-size: 1.15rem;
    }

    .status-badge {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }

    .detail-row {
        padding: 12px 14px;
    }

    .form-buttons {
        flex-direction: column;
    }

    .overview-map-section {
        padding: 18px;
    }

    .map-title {
        font-size: 1.2rem;
    }

    .overview-map-container {
        max-width: 100%;
        border-width: 1px;
    }

    .overview-marker {
        width: 28px;
        height: 28px;
    }

    .overview-marker::before {
        width: 22px;
        height: 22px;
    }

    .overview-marker::after {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .overview-marker-label {
        top: -24px;
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .map-container {
        border-width: 1px;
    }

    .map-marker {
        width: 34px;
        height: 34px;
    }

    .map-marker::before {
        width: 24px;
        height: 24px;
    }

    .map-marker::after {
        width: 16px;
        height: 16px;
        border-width: 2px;
    }

    .marker-label {
        top: -26px;
        padding: 3px 10px;
        font-size: 0.7rem;
    }

    .map-marker-view {
        width: 24px;
        height: 24px;
    }

    .map-marker-view::before {
        width: 18px;
        height: 18px;
    }

    .map-marker-view::after {
        width: 12px;
        height: 12px;
        border-width: 1px;
    }

    .map-marker-view .marker-label {
        top: -20px;
        padding: 2px 7px;
        font-size: 0.6rem;
    }

    .dropdown-map {
        padding: 10px;
    }

    .map-hint {
        font-size: 0.8rem;
    }

    footer {
        padding: 14px 16px;
    }

    footer p {
        font-size: 0.8rem;
    }

    @keyframes markerRipple {
        0% {
            width: 14px;
            height: 14px;
            opacity: 0.7;
        }
        100% {
            width: 40px;
            height: 40px;
            opacity: 0;
        }
    }
}

/* ============================================================
   12. MOBİL UYUMLULUK — KÜÇÜK TELEFON (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 20px 14px;
        border-radius: var(--radius-sm);
    }

    header h1 {
        font-size: 1.3rem;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    .header-buttons {
        gap: 8px;
    }

    .header-buttons .btn-back,
    .header-buttons .btn-add,
    .header-buttons .btn-map,
    .btn-edit {
        padding: 12px 16px;
        font-size: 0.9rem;
    }

    .miner-card {
        padding: 18px;
        border-radius: var(--radius-md);
    }

    .miner-avatar {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }

    .miner-avatar.small {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .miner-name h2 {
        font-size: 1.1rem;
    }

    .miner-id {
        font-size: 0.78rem;
    }

    .status-badge {
        font-size: 0.78rem;
        padding: 6px 14px;
    }

    .detail-row {
        padding: 10px 12px;
        gap: 10px;
    }

    .detail-icon,
    .dropdown-icon,
    .item-icon {
        font-size: 1.1rem;
        width: 30px;
        height: 30px;
    }

    .detail-label {
        font-size: 0.72rem;
    }

    .detail-value {
        font-size: 0.9rem;
    }

    .dropdown-header {
        padding: 14px;
    }

    .edit-card {
        padding: 18px;
    }

    .edit-header {
        margin-bottom: 18px;
        padding-bottom: 16px;
    }

    .edit-header h3 {
        font-size: 1.1rem;
    }

    .edit-form {
        gap: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 11px 14px;
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .current-map-preview {
        padding: 12px;
    }

    .current-map-img {
        max-height: 250px;
    }

    /* Küçük ekran harita */
    .overview-map-section {
        padding: 14px;
    }

    .map-title {
        font-size: 1.05rem;
        margin-bottom: 14px;
    }

    .overview-marker {
        width: 24px;
        height: 24px;
    }

    .overview-marker::before {
        width: 18px;
        height: 18px;
    }

    .overview-marker::after {
        width: 12px;
        height: 12px;
        border-width: 2px;
    }

    .overview-marker-label {
        top: -20px;
        padding: 2px 7px;
        font-size: 0.6rem;
        border-radius: 8px;
    }

    .map-marker {
        width: 28px;
        height: 28px;
    }

    .map-marker::before {
        width: 20px;
        height: 20px;
    }

    .map-marker::after {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }

    .marker-label {
        top: -22px;
        padding: 2px 8px;
        font-size: 0.65rem;
    }

    .map-marker-view {
        width: 20px;
        height: 20px;
    }

    .map-marker-view::before {
        width: 15px;
        height: 15px;
    }

    .map-marker-view::after {
        width: 10px;
        height: 10px;
        border-width: 1px;
    }

    .map-marker-view .marker-label {
        top: -16px;
        padding: 2px 5px;
        font-size: 0.55rem;
    }

    .dropdown-map {
        padding: 8px;
    }

    .map-hint {
        font-size: 0.78rem;
    }

    .btn-save,
    .btn-delete,
    .btn-cancel {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    @keyframes markerRipple {
        0% {
            width: 12px;
            height: 12px;
            opacity: 0.6;
        }
        100% {
            width: 35px;
            height: 35px;
            opacity: 0;
        }
    }
}

/* ============================================================
   13. BÜYÜK EKRAN OPTİMİZASYONLARI
   ============================================================ */
@media (min-width: 1600px) {
    .miners-grid {
        grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
        gap: 28px;
    }

    .container {
        padding: 32px;
    }
}

/* ============================================================
   14. YAZDIRMA STİLLERİ
   ============================================================ */
@media print {
    body {
        background: #fff;
        color: #000;
    }

    .miner-card,
    .overview-map-section,
    header {
        background: #fff;
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }

    footer {
        position: static;
    }

    .status-dot,
    .overview-marker,
    .map-marker {
        animation: none;
    }
}

/* ============================================================
   15. ERİŞİLEBİLİRLİK İYİLEŞTİRMELERİ
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus visible - klavye ile gezen kullanıcılar için */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Kartlar için son çocuk margin düzeltmesi */
.miner-details > :last-child {
    margin-bottom: 0;
}
