* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding-bottom: 70px;
    display: flex;
    flex-direction: column;
}

.header {
    background: #d9534f;
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.subtitle {
    font-size: 11px;
    opacity: 0.85;
    line-height: 1.4;
    margin-top: 2px;
}

.last-update {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.last-update i {
    font-size: 11px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.source-selector {
    display: flex;
    gap: 8px;
}

.app-download-btn {
    display: none; /* Varsayılan olarak gizli */
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.app-download-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.app-download-btn i {
    font-size: 18px;
}

/* Sadece mobil cihazlarda göster */
@media (max-width: 768px) {
    .app-download-btn {
        display: flex;
    }
}

.source-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.source-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.source-btn.active {
    background: white;
    color: #d9534f;
    border-color: white;
}

.controls {
    padding: 15px 30px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: all 0.2s ease;
    background: #fff;
    color: #333;
}

.btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.btn i {
    font-size: 14px;
}

.filter-panel {
    padding: 15px 30px;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-panel input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
    min-width: 180px;
    transition: border-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.filter-panel input:focus {
    outline: none;
    border-color: #d9534f;
}

.earthquake-list {
    padding: 20px 30px;
    min-height: 400px;
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding-bottom: 20px;
    flex: 1;
}

.earthquake-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.earthquake-magnitude {
    min-width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.earthquake-info {
    flex: 1;
    min-width: 0;
}

.earthquake-location {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    word-break: break-word;
}

.earthquake-details {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-item i {
    font-size: 12px;
    color: #999;
}


.error-message {
    padding: 40px 30px;
    text-align: center;
    color: #d9534f;
}

.error-message p {
    margin-bottom: 15px;
}

.error-message i {
    margin-right: 8px;
}

.no-data i {
    margin-right: 8px;
}

.error-message button {
    margin: 5px;
    padding: 10px 20px;
    background: #d9534f;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s ease;
}

.error-message button:hover {
    background: #c9302c;
}

.no-data {
    padding: 60px 30px;
    text-align: center;
    color: #999;
}

.no-data p {
    font-size: 16px;
    margin-bottom: 20px;
}



/* Scrollbar */
.earthquake-list::-webkit-scrollbar {
    width: 6px;
}

.earthquake-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.earthquake-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.earthquake-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Alt Navigasyon Menüsü */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    width: 100%;
}

.bottom-nav ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 65px;
    max-width: 1000px;
    margin: 0 auto;
}

.bottom-nav li {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #666;
    padding: 8px 12px;
    transition: all 0.2s ease;
    width: 100%;
    height: 100%;
    gap: 4px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.bottom-nav .nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.bottom-nav .nav-item span {
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.bottom-nav .nav-item:hover {
    color: #d9534f;
    background: #fafafa;
}

.bottom-nav .nav-item:hover i {
    transform: scale(1.1);
}

.bottom-nav .nav-item.active {
    color: #d9534f;
}

.bottom-nav .nav-item.active i {
    color: #d9534f;
}

.bottom-nav .nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #d9534f;
}

/* Responsive - Mobil Uyumluluk */
@media (max-width: 768px) {
    body {
        padding: 0;
        padding-bottom: 65px;
        /* iPhone X ve üzeri için safe area desteği */
        padding-bottom: calc(65px + env(safe-area-inset-bottom));
    }

    .container {
        border-radius: 0;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    .header {
        padding: 15px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .app-download-btn {
        display: flex !important;
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }

    .logo {
        width: 100%;
    }

    .logo h1 {
        font-size: 20px;
    }

    .subtitle {
        font-size: 10px;
    }

    .last-update {
        font-size: 11px;
    }

    .source-selector {
        width: 100%;
        justify-content: space-between;
    }

    .source-btn {
        flex: 1;
        padding: 10px 12px;
        font-size: 13px;
        min-height: 44px; /* Touch-friendly */
    }

    .controls {
        padding: 12px 20px;
        gap: 8px;
    }

    .btn {
        flex: 1;
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px; /* Touch-friendly */
        justify-content: center;
    }

    .filter-panel {
        padding: 12px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .filter-panel input {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* iOS zoom önleme */
        min-height: 44px; /* Touch-friendly */
        border-radius: 8px;
    }

    .earthquake-list {
        padding: 15px 20px;
        padding-bottom: 20px;
        min-height: 400px;
        max-height: calc(100vh - 250px);
        flex: 1;
        overflow-y: auto;
    }

    .earthquake-item {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 12px;
    }

    .earthquake-magnitude {
        margin: 0 auto;
        font-size: 28px;
    }

    .earthquake-details {
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .detail-item {
        font-size: 13px;
    }


    /* Alt navigasyon menüsü */
    .bottom-nav {
        left: 0 !important;
        right: 0 !important;
        /* iPhone X ve üzeri için safe area desteği */
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .bottom-nav ul {
        height: 60px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .bottom-nav .nav-item {
        padding: 6px 8px;
        gap: 3px;
        min-height: 44px; /* Touch-friendly */
    }
    
    .bottom-nav .nav-item i {
        font-size: 20px;
    }
    
    .bottom-nav .nav-item span {
        font-size: 10px;
    }

    /* Error ve no-data mesajları */
    .error-message {
        padding: 30px 20px;
    }

    .error-message button {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        min-height: 44px;
    }

    .no-data {
        padding: 40px 20px;
    }
}

/* Küçük ekranlar için ek optimizasyonlar */
@media (max-width: 480px) {
    .header {
        padding: 12px 15px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .subtitle {
        font-size: 9px;
    }

    .source-btn {
        font-size: 12px;
        padding: 8px 10px;
    }

    .controls {
        padding: 10px 15px;
    }

    .btn {
        font-size: 13px;
        padding: 10px 12px;
    }

    .earthquake-list {
        padding: 12px 15px;
        padding-bottom: 20px;
        min-height: 350px;
        max-height: calc(100vh - 240px);
        overflow-y: auto;
    }

    .earthquake-item {
        padding: 12px;
    }

    .earthquake-magnitude {
        font-size: 24px;
    }

    .detail-item {
        font-size: 12px;
    }
}
