:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --danger-color: #FF3B30;
    --background-color: #F2F2F7;
    --text-color: #000000;
    --border-color: #C7C7CC;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

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

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

h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Übersichtstabelle Styles */
.overview-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#exercise-overview {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

#exercise-overview th,
#exercise-overview td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#exercise-overview th {
    background-color: var(--background-color);
    font-weight: 600;
}

.status-header,
.sets-header,
.weight-header,
.reps-header {
    width: 40px;
    text-align: center;
    font-size: 16px;
}

.status-header {
    color: #34C759;
}

.sets-header {
    color: var(--primary-color);
}

.weight-header {
    color: #FF9500;
}

.reps-header {
    color: #5856D6;
}

#exercise-overview tr:last-child td {
    border-bottom: none;
}

.selection-hint {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
    font-style: italic;
}

.exercise-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.exercise-row:hover {
    background-color: #f8f9fa;
}

.exercise-row.completed {
    background-color: #e8f5e8;
    opacity: 0.7;
}

.exercise-row.completed:hover {
    background-color: #d4edda;
}

.exercise-row.current {
    background-color: #e3f2fd;
    border-left: 4px solid var(--primary-color);
}

.exercise-row.current:hover {
    background-color: #bbdefb;
}

.exercise-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

@media (max-width: 390px) {
    .exercise-checkbox {
        width: 16px;
        height: 16px;
    }
}

.exercise-name-cell {
    font-weight: 500;
}

.exercise-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="number"],
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn.danger {
    background-color: var(--danger-color);
    color: white;
}

.set-counter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    gap: 15px;
}

.set-counter {
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    flex: 1;
}

#progress {
    font-size: 16px;
    color: var(--primary-color);
    margin-top: 10px;
}

.header-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.file-upload {
    text-align: center;
}

.btn.success {
    background-color: #34C759;
    color: white;
}


/* iOS-spezifische Fixes */
@supports (-webkit-touch-callout: none) {
    .btn {
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
    }
    
    input[type="number"],
    textarea {
        -webkit-appearance: none;
        -webkit-border-radius: 8px;
    }
}

@media (max-width: 390px) {
    .container {
        padding: 15px;
    }
    
    .exercise-container,
    .overview-container {
        padding: 15px;
    }
    
    .btn {
        padding: 10px 16px;
        min-height: 44px; /* iOS Mindestgröße für Touch-Targets */
    }

    #exercise-overview th,
    #exercise-overview td {
        padding: 6px 4px;
        font-size: 13px;
    }
    
    .status-header,
    .sets-header,
    .weight-header,
    .reps-header {
        width: 30px;
        font-size: 14px;
    }
    
    #exercise-overview td:first-child,
    #exercise-overview td:nth-child(3),
    #exercise-overview td:nth-child(4),
    #exercise-overview td:nth-child(5) {
        text-align: center;
        width: 30px;
    }
    
    .modal-content {
        margin: 10px;
        padding: 15px;
    }
    
    .header-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .set-counter-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    max-width: 90%;
    word-wrap: break-word;
    /* Schutz vor virtuellem Tastenfeld */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.toast.success {
    background-color: #34C759;
}

.toast.error {
    background-color: #FF3B30;
}

.toast.warning {
    background-color: #FF9500;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    -webkit-tap-highlight-color: transparent;
}

.toast-close:hover {
    opacity: 0.7;
}

@media (max-width: 390px) {
    .toast {
        top: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        max-width: none;
        /* Sicherheitsabstand zum Tastenfeld */
        bottom: auto;
        max-height: calc(100vh - 200px);
    }
}

/* Spezielle Behandlung für Geräte mit virtuellem Tastenfeld */
@media (max-height: 600px) {
    .toast {
        top: 5px;
        max-height: calc(100vh - 150px);
        font-size: 14px;
        padding: 10px 15px;
    }
} 