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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

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

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.week-info {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.sync-status {
    font-size: 0.9rem;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.sync-status.synced::before {
    content: "✅ ";
    color: #4ade80;
}

.sync-status.syncing::before {
    content: "⏳ ";
    color: #fbbf24;
}

.sync-status.error::before {
    content: "⚠️ ";
    color: #ef4444;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

th:first-child {
    border-radius: 10px 0 0 0;
}

th:last-child {
    border-radius: 0 10px 0 0;
}

td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
}

.label {
    font-weight: 600;
    text-align: left;
    padding-left: 15px;
    color: #333;
    font-size: 0.95rem;
}

.label-col {
    width: 150px;
}

.sum-col {
    width: 100px;
    background: rgba(255, 255, 255, 0.2);
}

.sum-cell {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.sum-value {
    font-size: 1.1rem;
    color: #667eea;
}

.time-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.time-input:hover {
    border-color: #667eea;
}

.time-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.pause-input {
    border-color: #ffe0e0;
    background: #fff8f8;
}

.pause-input:hover {
    border-color: #ff9999;
}

.pause-input:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.result-row {
    font-weight: 600;
}

.result-row td {
    font-size: 1.05rem;
}

.brutto-row {
    background: #f0f0f5;
}

.brutto-row td {
    color: #667eea;
}

.pause-row {
    background: #fffbfb;
}

.total-row {
    background: #e8f5e9;
    border-bottom: none;
}

.total-row td {
    color: #2e7d32;
    font-size: 1.1rem;
    padding: 15px 10px;
}

.total-sum {
    font-size: 1.3rem !important;
    font-weight: 700;
    color: #2e7d32 !important;
}

.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.btn-icon {
    font-size: 1.2rem;
}

.btn-reset {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-reset:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.btn-refresh {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: white;
}

.btn-refresh:hover {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.btn-refresh.syncing {
    animation: spin 1s linear infinite;
}

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

.btn-today {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-today:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.btn-export {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
}

.btn-export:hover {
    background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%);
}

.btn-import {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: white;
}

.btn-import:hover {
    background: linear-gradient(135deg, #fee140 0%, #fa709a 100%);
}

/* Responsive Design */
@media (max-width: 1024px) {
    body {
        padding: 15px;
    }
    
    .container {
        max-width: 100%;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
    }
    
    header h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    .week-info {
        font-size: 1rem;
        padding: 6px 15px;
    }
    
    .card {
        padding: 15px 10px;
        border-radius: 15px;
    }
    
    table {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 8px 4px;
        font-size: 0.8rem;
    }
    
    th {
        padding: 12px 4px;
    }
    
    .label {
        font-size: 0.8rem;
        padding-left: 8px;
    }
    
    .label-col {
        width: 90px;
    }
    
    .sum-col {
        width: 70px;
    }
    
    .time-input {
        padding: 6px 4px;
        font-size: 0.85rem;
    }
    
    .sum-value {
        font-size: 0.95rem;
    }
    
    .total-sum {
        font-size: 1.1rem !important;
    }
    
    .actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    header {
        margin-bottom: 20px;
    }
    
    header h1 {
        font-size: 1.4rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .week-info {
        font-size: 0.9rem;
        padding: 5px 12px;
    }
    
    .card {
        padding: 12px 5px;
        border-radius: 12px;
        overflow-x: auto;
    }
    
    table {
        font-size: 0.7rem;
        min-width: 100%;
    }
    
    th {
        padding: 10px 3px;
        font-size: 0.7rem;
        letter-spacing: 0px;
    }
    
    td {
        padding: 6px 3px;
        font-size: 0.75rem;
    }
    
    .label {
        font-size: 0.7rem;
        padding-left: 5px;
    }
    
    .label-col {
        width: 75px;
    }
    
    .sum-col {
        width: 60px;
    }
    
    .time-input {
        padding: 5px 2px;
        font-size: 0.75rem;
        border-width: 1px;
    }
    
    .result-row td {
        font-size: 0.8rem;
    }
    
    .total-row td {
        font-size: 0.85rem;
        padding: 10px 3px;
    }
    
    .sum-value {
        font-size: 0.85rem;
    }
    
    .total-sum {
        font-size: 1rem !important;
    }
    
    .btn {
        padding: 11px 18px;
        font-size: 0.9rem;
    }
    
    .btn-icon {
        font-size: 1rem;
    }
}

/* Horizontales Scrolling für sehr kleine Bildschirme */
@media (max-width: 360px) {
    .card {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 320px;
    }
}

/* Animation für berechnete Werte */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.brutto, .total {
    animation: fadeIn 0.3s ease;
}