:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #4f46e5;
    --light: #f3f4f6;
    --dark: #1f2937;
    --gray: #6b7280;
    --success: #10b981;
    --sidebar-width: 280px;
}

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

body {
    background-color: #f9fafb;
    color: var(--dark);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem 1rem;
    overflow-y: auto;
    position: fixed;
    height: 100vh;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.subject-list {
    list-style: none;
    margin-bottom: 2rem;
}

.subject-item {
    margin-bottom: 0.5rem;
}

.subject-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1rem;
    background: transparent;
    border: none;
    color: white;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subject-btn:hover, .subject-btn.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.contact-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.contact-info h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Main content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

.welcome-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.welcome-section h1 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.news-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-date {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Subject content */
.subject-content {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.subject-content.active {
    display: block;
}

.subject-description {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.subject-description h2 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.tasks-table th {
    text-align: left;
    padding: 1rem;
    background-color: var(--light);
    border-bottom: 2px solid var(--primary);
}

.tasks-table td {
    padding: 1rem;
    vertical-align: top;
    border-bottom: 1px solid #eee;
}

.tasks-table tr:last-child td {
    border-bottom: none;
}

.week-num {
    background-color: var(--light);
    color: var(--dark);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.task-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.task-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.help-item {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.help-item:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--success);
}

.grading-rules {
    background-color: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
}

.grading-rules h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.grading-rules ul {
    padding-left: 1.5rem;
}

.grading-rules li {
    margin-bottom: 0.5rem;
}

/* Responsywność */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .subject-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }
    
    .subject-item {
        margin-bottom: 0;
        flex: 1;
        min-width: 140px;
    }
    
    .tasks-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .subject-item {
        min-width: 100%;
    }
    
    .welcome-section, .subject-content {
        padding: 1.5rem;
    }
    
    .tasks-table th, 
    .tasks-table td {
        padding: 0.5rem;
    }
}