:root {
    --primary-color: #4a90e2;
    --primary-hover: #357abd;
    --bg-color: #f4f7f9;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #888888;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    
    /* Zeit-Status Farben */
    --past-bg: #f0f0f0;
    --current-bg: #e3f2fd;
    --future-bg: #ffffff;
    --current-border: #4a90e2;
}

body.dark-mode {
    --primary-color: #64b5f6;
    --primary-hover: #90caf9;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --sidebar-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    
    --past-bg: #252525;
    --current-bg: #1a237e;
    --future-bg: #1e1e1e;
    --current-border: #64b5f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: var(--transition);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Styling */
.sidebar {
    width: 320px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

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

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Kalender Styling */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: 5px;
}

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

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.calendar-day:hover {
    background-color: var(--primary-color);
    color: white;
}

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

.calendar-day.has-tasks {
    border-bottom: 3px solid var(--primary-color);
}

.calendar-day.high-activity {
    background-color: rgba(74, 144, 226, 0.2);
}

.calendar-day.not-current-month {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Stats Styling */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.stat-value {
    font-weight: bold;
    font-size: 1rem;
}

.progress-container {
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Zeit-Grid Styling */
.time-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.time-block {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

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

.task-input.completed {
    text-decoration: line-through;
    color: var(--text-muted);
    opacity: 0.6;
}

.time-block.past {
    background-color: var(--past-bg);
    opacity: 0.8;
}

.time-block.current {
    background-color: var(--current-bg);
    border-color: var(--current-border);
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.time-label {
    width: 60px;
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.task-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    padding: 5px;
}

.task-input:focus {
    border-bottom: 1px solid var(--primary-color);
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.2rem;
    user-select: none;
}

.time-block.dragging {
    opacity: 0.4;
    transform: scale(0.98);
    border: 2px dashed var(--primary-color);
}

.time-block.drag-over {
    border: 2px solid var(--primary-color);
    background-color: rgba(74, 144, 226, 0.1);
}

/* Buttons */
.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.secondary-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}

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

.sidebar-footer {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-content {
        height: auto;
    }
}
