/* Haushalts-App Styles - Version 0.1 */

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --text-color: #333;
    --border-radius: 12px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* {
    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;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 400px);
}

/* Header */
header {
    background: white;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.points-badge {
    background: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

/* Navigation */
nav {
    background: var(--dark-color);
    padding: 0;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
}

nav ul li a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

nav ul li a:hover,
nav ul li a.active {
    background: var(--primary-color);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.card-header {
    border-bottom: 2px solid var(--light-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card-header h2 {
    color: var(--dark-color);
    font-size: 22px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 16px;
    transition: var(--transition);
    font-weight: 500;
}

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

.btn-primary:hover {
    background: #357ABD;
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: #45B368;
}

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

.btn-danger:hover {
    background: #C0392B;
}

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

.btn-small {
    padding: 5px 12px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.pin-input {
    font-size: 24px;
    text-align: center;
    letter-spacing: 10px;
    font-weight: bold;
}

/* Task List */
.task-list {
    display: grid;
    gap: 15px;
}

.task-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    align-items: center;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow);
}

.task-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.task-info {
    flex: 1;
}

.task-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.task-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.task-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #888;
}

.task-points {
    background: var(--warning-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.task-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Calendar */
.calendar-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
}

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

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 10px;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.calendar-day {
    aspect-ratio: 1;
    padding: 10px;
    border: 2px solid var(--light-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.1);
}

.calendar-day.has-tasks {
    background: rgba(80, 200, 120, 0.1);
    border-color: var(--secondary-color);
}

.calendar-day.today {
    background: var(--primary-color);
    color: white;
    font-weight: bold;
}

.task-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Leaderboard */
.leaderboard {
    display: grid;
    gap: 10px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--light-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.leaderboard-item:hover {
    transform: scale(1.02);
}

.leaderboard-rank {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 40px;
}

.leaderboard-rank.gold {
    color: #FFD700;
}

.leaderboard-rank.silver {
    color: #C0C0C0;
}

.leaderboard-rank.bronze {
    color: #CD7F32;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    font-weight: bold;
    font-size: 18px;
}

.leaderboard-points {
    background: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

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

.reward-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.reward-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.reward-content {
    padding: 15px;
}

.reward-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.reward-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

.reward-cost {
    background: var(--warning-color);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    
    nav ul li a {
        text-align: center;
    }
    
    .calendar-grid {
        gap: 5px;
    }
    
    .calendar-day {
        padding: 5px;
        font-size: 14px;
    }
    
    .task-item {
        flex-direction: column;
    }
    
    .task-image {
        width: 100%;
        height: 150px;
    }
    
    .task-actions {
        flex-direction: row;
        width: 100%;
    }
    
    .task-actions .btn {
        flex: 1;
    }
    
    .rewards-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        padding: 30px 20px;
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    align-items: center;
    justify-content: center;
}

.gap-10 {
    gap: 10px;
}

/* Footer */
footer {
    background: white;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    box-shadow: var(--shadow);
}

.version {
    color: #888;
    font-size: 14px;
}
