* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    background: #f3f4f6;
    color: #111827;
}

.topbar {
    background: #111827;
    color: white;
    padding: 22px 30px;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.topbar h1 {
    margin: 0;
    font-size: 25px;
}

.subtitle {
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 14px;
}

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

.main-card {
    background: white;
    padding: 32px;
    border-radius: 15px;
    box-shadow:
        0 4px 18px
        rgba(0,0,0,.07);
}

.main-label,
.lesson-label {
    display: block;
    font-weight: 700;
    margin-bottom: 9px;
}

.text-input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    padding: 12px 14px;
    font-size: 16px;
    background: white;
    outline: none;
}

.text-input:focus {
    border-color: #2563eb;
    box-shadow:
        0 0 0 3px
        rgba(37,99,235,.12);
}

.course-title-input {
    font-size: 17px;
}

.main-actions {
    margin: 28px 0;
}

.button {
    border: 0;
    border-radius: 8px;
    padding: 11px 17px;
    font-weight: 700;
    cursor: pointer;
    transition:
        opacity .15s,
        transform .05s;
}

.button:hover {
    opacity: .9;
}

.button:active {
    transform: translateY(1px);
}

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

.button-danger {
    background: #dc2626;
    color: white;
    white-space: nowrap;
}

.topic-card {
    margin-top: 25px;
    padding: 24px;
    border: 2px solid #e5e7eb;
    border-radius: 13px;
    background: #f8fafc;
}

.topic-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.topic-title {
    font-size: 18px;
    font-weight: 700;
}

.lesson-card {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: white;
}

.lesson-header {
    display: flex;
    gap: 12px;
    align-items: center;
}

.lesson-title {
    font-weight: 600;
}

.lesson-label {
    margin-top: 18px;
}

.lesson-files {
    display: block;
    width: 100%;
    padding: 18px;
    border:
        2px dashed
        #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
    cursor: pointer;
}

.file-help {
    margin-top: 8px;
    color: #6b7280;
    font-size: 13px;
}

.file-preview {
    display: grid;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px;
    border: 1px solid #e5e7eb;
    border-radius: 9px;
    background: #f9fafb;
}

.preview-image {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 7px;
    border: 1px solid #e5e7eb;
}

.file-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #e5e7eb;
    font-size: 14px;
    font-weight: 800;
    color: #374151;
}

.preview-info {
    min-width: 0;
}

.preview-name {
    font-weight: 600;
    word-break: break-word;
}

.preview-size {
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
}

.small-button {
    margin-top: 3px;
}

.build-button {
    display: block;
    width: 100%;
    margin-top: 32px;
    padding: 16px;
    background: #15803d;
    color: white;
    font-size: 18px;
}

@media (max-width: 700px) {

    .container {
        padding: 0 12px;
        margin-top: 20px;
    }

    .main-card {
        padding: 20px;
    }

    .topic-card {
        padding: 15px;
    }

    .topic-header,
    .lesson-header {
        flex-direction: column;
        align-items: stretch;
    }

    .button-danger {
        width: 100%;
    }
}
