/* ===== ALLGEMEINE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* ===== LOGIN-SEITE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 100%);
    color: white;
    padding: 40px 20px;
    text-align: center;
}

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

.login-tabs {
    display: flex;
    background: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn.active {
    background: white;
    border-bottom: 3px solid #FF6B6B;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-box h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

/* ===== FORMULARE ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size: 1.1em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 15px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
}

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

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.9em;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    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-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
}

.btn-success {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
    color: white;
    width: 100%;
}

.btn-warning {
    background: linear-gradient(135deg, #F7DC6F 0%, #F39C12 100%);
    color: white;
    width: 100%;
}

.btn-secondary {
    background: #e0e0e0;
    color: #666;
}

.btn-danger {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: white;
}

.btn-small {
    padding: 8px 20px;
    font-size: 0.9em;
}

/* ===== NACHRICHTEN ===== */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.message.error {
    background: #ffebee;
    color: #c62828;
    display: block;
}

.message.success {
    background: #e8f5e9;
    color: #2e7d32;
    display: block;
}

/* ===== HEADER ===== */
.app-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.8em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.kinder-header {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA07A 100%);
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ===== AUFGABEN-LISTE (ELTERN) ===== */
.action-bar {
    margin: 20px 0;
}

.aufgaben-liste {
    display: grid;
    gap: 15px;
}

.aufgabe-item {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border-left: 5px solid;
}

.aufgabe-item:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.aufgabe-icon {
    font-size: 3em;
    min-width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    color: white;
}

.aufgabe-content {
    flex: 1;
}

.aufgabe-content h3 {
    font-size: 1.5em;
    margin-bottom: 5px;
    color: #333;
}

.aufgabe-content p {
    color: #666;
    font-size: 0.9em;
}

.aufgabe-tag {
    display: inline-block;
    background: #e0e0e0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-top: 8px;
}

.aufgabe-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.3s;
}

.icon-btn:hover {
    background: #f0f0f0;
}

/* ===== AUFGABEN-GRID (KINDER) ===== */
.progress-container {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.progress-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

.progress-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4ECDC4 0%, #44A08D 100%);
    border-radius: 15px;
    transition: width 0.5s ease;
    width: 0%;
}

.aufgaben-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.aufgabe-card {
    background: white;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.aufgabe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
}

.aufgabe-card:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.aufgabe-card:active {
    transform: scale(0.95);
}

.aufgabe-card.erledigt {
    opacity: 0.6;
    background: #f5f5f5;
}

.aufgabe-card-icon {
    font-size: 5em;
    margin-bottom: 15px;
}

.aufgabe-card h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #333;
}

.aufgabe-card p {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 15px;
}

.check-mark {
    font-size: 3em;
    color: #4CAF50;
    display: none;
    animation: pop 0.3s ease-out;
}

.aufgabe-card.erledigt .check-mark {
    display: block;
}

@keyframes pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== CELEBRATION ===== */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.celebration-content {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    animation: bounceIn 0.5s;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.celebration-emoji {
    font-size: 5em;
    margin-bottom: 20px;
}

.celebration-content h2 {
    font-size: 3em;
    color: #4CAF50;
    margin-bottom: 15px;
}

.celebration-content p {
    font-size: 1.5em;
    color: #666;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 5em;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 2em;
    color: white;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 1.2em;
    color: rgba(255, 255, 255, 0.8);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: white;
    border-radius: 25px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: #667eea;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.modal-content form {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== COLOR PICKER ===== */
.color-picker,
.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.color-picker label,
.icon-picker label {
    cursor: pointer;
}

.color-picker input,
.icon-picker input {
    display: none;
}

.color-box {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-picker input:checked + .color-box {
    border-color: #333;
    transform: scale(1.1);
}

.icon-display {
    display: block;
    font-size: 2em;
    padding: 5px;
    border: 3px solid transparent;
    border-radius: 10px;
    transition: all 0.3s;
}

.icon-picker input:checked + .icon-display {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .aufgaben-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .login-header h1 {
        font-size: 1.5em;
    }
}

/* ===== TOUCHSCREEN OPTIMIERUNGEN ===== */
@media (hover: none) {
    .aufgabe-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
}

/* ===== TABS ===== */
.tabs-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.tab-button {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-button:hover {
    background: #f0f0f0;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* ===== KINDER-GRID (ELTERN) ===== */
.kinder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.kind-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.kind-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kind-avatar {
    margin-bottom: 15px;
}

.kind-card h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #333;
}

.kind-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ===== KINDER-BEREICH (KINDER-DASHBOARD) ===== */
.kind-bereich {
    background: white;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.kind-header {
    padding: 20px;
}

.kind-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.kind-avatar-large {
    font-size: 3em;
}

.kind-info h2 {
    font-size: 2em;
    color: #333;
}

.kind-fortschritt {
    margin-top: 15px;
}

.fortschritt-text {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2em;
    color: #333;
}

/* ===== CHECKBOX-GROUP ===== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.checkbox-label:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #667eea;
}

/* ===== UPDATES FÜR AUFGABEN-TAG ===== */
.aufgabe-content > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aufgabe-tag {
    display: inline-block;
    background: #e0e0e0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
}

/* ===== ANPASSUNGEN FÜR MOBILE ===== */
@media (max-width: 768px) {
    .tabs-container {
        flex-direction: row;
    }
    
    .kinder-grid {
        grid-template-columns: 1fr;
    }
    
    .kind-info {
        flex-direction: column;
        text-align: center;
    }
    
    .kind-info h2 {
        font-size: 1.5em;
    }
}