/* style.css */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header & Stats */
header {
    margin-bottom: 30px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

h1 {
    color: #2c3e50;
    font-size: 24px;
}

/* İndirme Butonu Stili */
.btn-download {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-download:hover {
    background-color: #218838;
}

.btn-download:active {
    transform: scale(0.98);
}

.btn-download:disabled {
    background-color: #94d3a2;
    cursor: not-allowed;
}

.header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card.live {
    border-top: 4px solid #e74c3c;
}

.stat-label {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
}

.stat-card.live .stat-value {
    color: #e74c3c;
}

/* Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.card h2 {
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

/* Liste ve Tablo Yapısı */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    border-radius: 6px 6px 0 0;
    margin-bottom: 5px;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 0.9rem;
}

.list-row:last-child {
    border-bottom: none;
}

.col-name {
    flex: 2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
    font-weight: 500;
}

.col-data {
    flex: 1;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-weight: 700;
}

.col-data.recent { color: #007bff; }
.col-data.total { color: #6c757d; }

/* Ziyaretçi Listesi Stilleri */
.visitors-list {
    max-height: 400px;
    overflow-y: auto;
}

.visitor-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

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

.visitor-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.visitor-url {
    font-weight: 600;
    color: #3498db;
    font-size: 0.9em;
}

.visitor-time {
    font-size: 0.8em;
    color: #95a5a6;
}

.visitor-details {
    display: flex;
    gap: 10px;
    font-size: 0.8em;
    color: #7f8c8d;
    flex-wrap: wrap;
}

.visitor-detail span {
    font-weight: 600;
    margin-right: 3px;
}

/* Canlı Göstergesi */
.live-indicator {
    display: flex;
    align-items: center;
    color: #e74c3c;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.pulse {
    width: 10px;
    height: 10px;
    background-color: #e74c3c;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

.empty, .loading {
    text-align: center;
    padding: 20px;
    color: #95a5a6;
}

/* Scrollbar Düzenlemesi */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }
