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

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-box {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 120px;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.runs-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.runs-container h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
    font-size: 1.8em;
    font-weight: 700;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.control-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

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

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

.selected-info {
    color: #555;
    font-weight: 600;
    font-size: 0.95em;
    background: rgba(255,255,255,0.95);
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* Fallback dla starszych przeglądarek */
    background: white;
    background: rgba(255,255,255,0.95);
}

#selectedCount {
    color: #667eea;
    font-weight: 700;
    font-size: 1.1em;
}

.run-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.run-entry:hover {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding-left: 15px;
    padding-right: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transform: translateY(-1px);
}

.run-entry:last-child {
    border-bottom: none;
}

.run-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.run-checkbox:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.run-checkbox:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    transform: scale(1.05);
}

.run-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.run-date {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
    min-width: 100px;
    flex-shrink: 0;
}

.run-details {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.distance {
    background: #e3f2fd;
    color: #1976d2;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

.time {
    background: #f3e5f5;
    color: #7b1fa2;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 70px;
    text-align: center;
}

.pace {
    background: #e8f5e8;
    color: #388e3c;
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-style: italic;
    opacity: 0.8;
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

footer a:hover {
    border-bottom-color: white;
}

@media (max-width: 600px) {
    .run-entry {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .run-details {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .container {
        padding: 15px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .run-checkbox {
        align-self: center;
    }
}