main {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    display: grid;
    grid-template-columns: 896px 320px;
    gap: 2rem;
}

main>div:first-child {
    display: flex;
    flex-direction: column;
}

.course-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #E5E7EB;
}

.course-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.course-meta-wrapper {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.course-meta-wrapper .course-meta {
    flex: 1;
}

.course-meta span {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.course-meta span.subject-tag {
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.report-btn-course {
    padding: 0.4rem 0.8rem;
    height: fit-content;
}

.report-btn-comment {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    color: #9ca3af;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: auto;
}

.rating-prompt {
    text-align: center;
    color: #6b7280;
    margin-top: 2rem;
}

.no-other-courses {
    color: var(--text-color);
    font-size: 0.9rem;
    text-align: center;
}

.quiz-start-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: #7AD47A;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
}

.quiz-start-btn:hover {
    background-color: #6bc26b;
    transform: translateY(-2px);
}

.course-meta span:not(:first-child) {
    background-color: transparent;
    color: #6B7280;
    font-size: 1rem;
    font-weight: 400;
}

.course-header h1 {
    font-size: 2.25rem;
    color: #002B5B;
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 0.5rem;
}

.course-author {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.course-author img.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.course-author-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1;
}

.course-author-info strong {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
}

.course-rating {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.course-rating div {
    display: flex;
    gap: 0.25rem;
}

.course-rating .star-icon {
    width: 18px;
    height: 18px;
}

.course-rating img {
    width: 18px;
    height: 18px;
}

.course-rating span {
    font-size: 0.875rem;
    color: #4B5563;
    font-weight: 400;
}

.course-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #E5E7EB;
}

.course-meta-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.action-btn.edit-btn {
    background: var(--secondary-color);
    color: var(--white);
}

.action-btn.edit-btn:hover {
    background: #0099B8;
    transform: translateY(-1px);
}

.action-btn.delete-btn {
    background: #DC2626;
    color: var(--white);
}

.action-btn.delete-btn:hover {
    background: #B91C1C;
    transform: translateY(-1px);
}

.course-stats span {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: #4B5563;
    font-size: 0.875rem;
    font-weight: 400;
}

.course-stats img {
    width: 16px;
    height: 16px;
}

.tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E5E7EB;
    align-items: center;
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #6B7280;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #00B4D8;
}

.tab-btn.active {
    color: #00B4D8;
    border-bottom-color: #00B4D8;
}

.tabs-content {
    display: flex;
    flex-direction: column;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 2rem;
}

.tab-content.active {
    display: flex;
}

.course-description {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #F3F4F6;
}

.course-description h3 {
    font-size: 1.25rem;
    color: #000000;
    font-weight: 600;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

.course-description p {
    color: #000000;
    line-height: 1.6;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.course-pdf-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid #F3F4F6;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.pdf-header h3 {
    font-size: 1.25rem;
    color: #000000;
    font-weight: 600;
    margin: 0;
    flex: 1;
    font-family: 'Poppins', sans-serif;
}

.pdf-header button {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background-color: #00B4D8;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.pdf-header button:hover {
    background-color: #009db3;
}

.pdf-viewer {
    width: 100%;
    height: 500px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
}

.reviews-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.reviews-stats {
    display: flex;
    justify-content: center;
    padding: 2rem;
    background-color: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #F3F4F6;
}

.reviews-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.reviews-score .big-score {
    font-size: 3rem;
    font-weight: 800;
    color: #00B4D8;
}

.reviews-score .out-of {
    font-size: 1.1rem;
    color: #4B5563;
    font-weight: 400;
}

.reviews-score .stars-display {
    display: flex;
    gap: 0.5rem;
}

.reviews-score .stars-display .star-icon {
    width: 24px;
    height: 24px;
}

.reviews-score .stars-display button {
    background-color: transparent;
    outline: none;
    border: none;
}

.reviews-score .review-count {
    font-size: 0.95rem;
    color: #4B5563;
    margin-top: 0.5rem;
    font-weight: 400;
}

.quizz-start-btn {
    align-self: flex-start;
    background-color: #7AD47A !important;
    margin-top: 1rem;
}

.quizz-start-btn:hover {
    background-color: #6bbf69 !important;
}

aside {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 320px;
}

aside section {
    background: #FFFFFF;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

aside h2 {
    font-size: 1.125rem;
    color: #000000;
    font-weight: 600;
    margin: 0;
    font-family: 'Poppins', sans-serif;
}

aside section:first-child button {
    width: 100%;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background-color: #00B4D8;
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

aside section:first-child button:hover {
    background-color: #009db3;
}

.author-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.author-card-header {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.author-card-header img.profile-picture {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-card-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.author-card-info strong {
    color: #1F2937;
    font-size: 1rem;
    font-weight: 600;
}

.author-card-info span {
    font-size: 0.875rem;
    color: #4B5563;
    font-weight: 400;
}

.author-card-info .rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.875rem;
}

.author-card-info .rating img {
    width: 16px;
    height: 16px;
}

.author-card p {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #000000;
    margin: 0;
    font-weight: 400;
}

.author-card button {
    background-color: #00B4D8;
    color: #FFFFFF;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.author-card button:hover {
    background-color: #009db3;
}

.other-courses-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-item {
    padding: 1rem;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.course-item:hover {
    border-color: #00B4D8;
    box-shadow: 0 2px 8px rgba(0, 180, 216, 0.1);
}

.course-item span:first-child {
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #FFFFFF;
    display: inline-block;
    width: fit-content;
}

.course-item span:nth-child(2) {
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.3;
}

.course-item span:nth-child(3) {
    color: #4B5563;
    font-size: 0.875rem;
    font-weight: 400;
}

.course-author-actions {
    display: flex;
    gap: 12px;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    flex: 1;
    font-family: inherit;
}

.edit-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
}

.edit-btn:hover {
    background: #0099B8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 180, 216, 0.3);
}

.delete-btn {
    background: #DC2626;
    color: white;
    border: none;
}

.delete-btn:hover {
    background: #991B1B;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

.action-btn svg {
    flex-shrink: 0;
}

.favorite-feedback {
    font-size: 0.85rem;
    color: #047857;
    margin: 0.5rem 0 0;
    min-height: 1rem;
}

#favorite-btn.favorite-pulse {
    animation: favoritePulse 400ms ease;
}

#favorite-btn img.favorite-twist {
    animation: favoriteTwist 500ms ease;
}

.stars-display img.star-bounce {
    animation: starBounce 350ms ease;
}

@keyframes favoritePulse {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.06);
    }
    70% {
        transform: scale(0.98);
    }
    100% {
        transform: scale(1);
    }
}
@media (max-width: 1100px) {
    main {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }

    .course-header {
        padding: 0 0 1.5rem;
    }

    main > div:first-child .course-header h1 {
        font-size: 1.6rem !important;
    }

    .course-meta-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .course-meta {
        gap: 0.5rem;
    }

    .course-meta span {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .course-stats {
        gap: 1rem;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 1rem;
    }

    .course-stats span {
        font-size: 0.85rem;
    }

    .course-author {
        padding: 1rem;
        background: #f9fafb;
        border-radius: 12px;
        margin: 1rem 0;
    }

    .tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin: 0 -1rem;
        padding: 0 1rem;
        border-bottom: 2px solid #f3f4f6;
        -webkit-overflow-scrolling: touch;
    }

    .tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 1rem 1.25rem;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .course-description, .course-pdf-section, .reviews-stats, aside section {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .pdf-viewer {
        height: 480px;
    }

    .pdf-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .reviews-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        text-align: center;
    }

    aside {
        width: 100%;
        gap: 1.5rem;
    }

    .author-card-header img.profile-picture {
        width: 50px;
        height: 50px;
    }

    aside section:first-child {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    aside section:first-child button, 
    aside section:first-child .quiz-start-btn {
        width: 100%;
        margin: 0;
    }
}
@keyframes favoriteTwist {
    0% {
        transform: rotate(0deg) scale(1);
    }
    30% {
        transform: rotate(-15deg) scale(1.1);
    }
    60% {
        transform: rotate(12deg) scale(1.1);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

@keyframes starBounce {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}