body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f7fb;
}

.container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

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

button {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #3a5a8a;
}

input, textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

input[type="file"] {
    background: #fff;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: transform 0.2s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.video-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #f0f0f0;
}

.video-info {
    padding: 15px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.danger-button {
    background-color: #d32f2f;
}

.danger-button:hover {
    background-color: #b71c1c;
}

.secondary-button {
    background-color: #8a97a8;
}

.secondary-button:hover {
    background-color: #748196;
}

.video-title {
    font-weight: bold;
    margin-bottom: 8px;
}

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

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: #4a6fa5;
    width: 0%;
    transition: width 0.3s;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.error {
    color: #d32f2f;
    margin: 10px 0;
}

.success {
    color: #2e7d32;
    margin: 10px 0;
}

.muted-text {
    color: #666;
}

.assignment-block,
.submission-list {
    margin-top: 16px;
    padding: 14px;
    background: #f8faff;
    border: 1px solid #dce7f5;
    border-radius: 8px;
}

.domain-section {
    margin-top: 24px;
}

.domain-section:first-child {
    margin-top: 0;
}

.domain-section-title {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #dce7f5;
    color: #22446b;
}

.domain-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0 16px;
}

.domain-toolbar input {
    margin: 0;
    flex: 1;
}

.domain-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.domain-chip {
    background: #e9f1fb;
    color: #22446b;
}

.domain-chip:hover {
    background: #d7e7fa;
}

.domain-chip.active {
    background: #22446b;
    color: #fff;
}

.hidden-section {
    display: none;
}

.assignment-locked {
    background: #f3f7f2;
    border-color: #cfe3c8;
}

.assignment-locked input,
.assignment-locked textarea,
.assignment-locked button {
    opacity: 0.7;
    cursor: not-allowed;
}

.assignment-block h3,
.submission-list h3,
.submission-list h4 {
    margin-top: 0;
}

.submission-item {
    padding: 12px 0;
    border-top: 1px solid #dce7f5;
}

.submission-item:first-child {
    border-top: none;
    padding-top: 0;
}

.submission-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.submission-status {
    margin-top: 10px;
    font-size: 14px;
}

.score-editor {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dce7f5;
}

.score-editor input {
    max-width: 220px;
}

/* Login page specific */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Video player page */
.video-player-container {
    max-width: 800px;
    margin: 0 auto;
}

video {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .container {
        padding: 20px;
    }

    .domain-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}
