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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #334155;
    line-height: 1.6;
}

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

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #334155;
}

/* Active Navigation Link */
.nav-link.active {
    color: #2563eb;
    font-weight: 600;
}

/* Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #2563eb;
    color: white;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.btn-secondary:hover {
    background-color: #1d4ed8;
}

.btn-full {
    width: 100%;
}

/* Main Layout */
.main {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* Sidebar Styles */
.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    font-size: 0.9rem;
}

/* Study Sessions Section */
.study-sessions {
    background: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #6b7280;
    font-size: 1rem;
}

.session-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.session-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: shadow 0.2s;
}

.session-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.user-avatar.small {
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.blue-avatar {
    background-color: #2563eb;
}

.session-info {
    flex: 1;
}

.user-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.subject {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.time-slot {
    color: #6b7280;
    font-size: 0.9rem;
}

.session-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Messages Panel */
.messages-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
}

.messages-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.search-box {
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.search-input::placeholder {
    color: #9ca3af;
}

.message-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.message-content {
    flex: 1;
}

.message-sender {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.message-text {
    color: #6b7280;
    font-size: 0.85rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .sidebar,
    .messages-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .session-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .session-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 1rem 0;
    }
    
    .study-sessions,
    .sidebar,
    .messages-panel {
        padding: 1rem;
    }
    
    .session-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
}
