/* File: style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Navbar */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo span {
    color: #3498db;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

.btn-login, .btn-register {
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
}

.btn-login {
    color: white;
    border: 1px solid white;
}

.btn-register {
    background-color: #3498db;
    color: white;
}

/* User dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-btn {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
}

.user-btn:hover {
    background-color: rgba(255,255,255,0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1000;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.show {
    display: block;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-view, .btn-enroll, .btn-youtube, .btn-daftar-large {
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    display: inline-block;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-view {
    background-color: #2ecc71;
    color: white;
}

.btn-view:hover {
    background-color: #27ae60;
}

.btn-enroll {
    background-color: #e74c3c;
    color: white;
}

.btn-enroll:hover {
    background-color: #c0392b;
}

.btn-daftar-large {
    padding: 15px 30px;
    font-size: 1.2rem;
    background-color: #e74c3c;
    color: white;
}

.btn-daftar-large:hover {
    background-color: #c0392b;
}

.btn-youtube {
    background-color: #ff0000;
    color: white;
}

.btn-youtube:hover {
    background-color: #cc0000;
}

/* Section */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Mata kuliah grid */
.mata-kuliah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.mata-kuliah-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.mata-kuliah-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.mata-kuliah-header {
    background-color: #3498db;
    color: white;
    padding: 20px;
}

.mata-kuliah-header h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.mata-kuliah-dosen, .mata-kuliah-stats {
    font-size: 0.9rem;
    opacity: 0.9;
}

.mata-kuliah-body {
    padding: 20px;
    min-height: 120px;
}

.mata-kuliah-body p {
    color: #555;
}

.mata-kuliah-footer {
    padding: 15px 20px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terdaftar-badge {
    background-color: #2ecc71;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Auth forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

.auth-card {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.auth-card h2 {
    margin-bottom: 30px;
    text-align: center;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dashboard */
.dashboard h1 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.dashboard > p {
    margin-bottom: 30px;
    color: #7f8c8d;
}

.action-bar {
    margin-bottom: 20px;
}

/* Mata kuliah detail */
.mata-kuliah-header-detail {
    background-color: #2c3e50;
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.mata-kuliah-header-detail h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.mata-kuliah-meta {
    display: flex;
    gap: 20px;
}

.mata-kuliah-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mata-kuliah-deskripsi {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mata-kuliah-deskripsi h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.daftar-section {
    text-align: center;
    margin: 30px 0;
}

.materi-section {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.materi-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.materi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.materi-header h3 {
    font-size: 1.3rem;
    color: #2c3e50;
}

.materi-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.materi-deskripsi {
    margin-bottom: 20px;
}

.materi-video {
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.materi-footer {
    display: flex;
    justify-content: flex-end;
}

/* Form containers */
.form-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 70vh;
    padding: 20px;
}

.form-card {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 700px;
}

.form-card h2 {
    margin-bottom: 30px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.mata-kuliah-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 25px;
}

.mata-kuliah-info h3 {
    color: #2c3e50;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.no-data-action {
    text-align: center;
    margin-top: 20px;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer p {
    margin-bottom: 10px;
}

.footer p:last-child {
    margin-bottom: 0;
}

/* Akses Terbatas */
.akses-terbatas {
    background-color: white;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 30px 0;
}

.akses-terbatas-content {
    max-width: 600px;
    margin: 0 auto;
}

.akses-terbatas-icon {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.akses-terbatas h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.akses-terbatas p {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
}

.akses-terbatas-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.info-text {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 5px;
    font-style: italic;
}

/* Status akses */
.status-akses {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.status-akses-berhasil {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-akses-ditolak {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Badge status */
.badge-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
}

.badge-terdaftar {
    background-color: #2ecc71;
    color: white;
}

.badge-belum-terdaftar {
    background-color: #e74c3c;
    color: white;
}

.badge-dosen {
    background-color: #3498db;
    color: white;
}

/* Info akses di kartu mata kuliah */
.akses-info {
    margin-top: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.akses-info i {
    margin-right: 5px;
}

.akses-info small {
    color: #6c757d;
}

/* Header section dengan tombol aksi */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

/* Header materi dengan tombol aksi */
.materi-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.materi-actions {
    display: flex;
    gap: 8px;
}

/* Tombol edit dan hapus kecil */
.btn-edit-small, .btn-delete-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.btn-edit-small {
    background-color: #3498db;
    color: white;
}

.btn-edit-small:hover {
    background-color: #2980b9;
}

.btn-delete-small {
    background-color: #e74c3c;
    color: white;
}

.btn-delete-small:hover {
    background-color: #c0392b;
}

/* Footer materi */
.materi-footer-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.materi-info {
    color: #2ecc71;
    font-size: 0.9rem;
}

.materi-info small {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Preview video di form edit */
.preview-section {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.preview-section h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.video-container-small {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}

.video-container-small iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.no-preview {
    color: #7f8c8d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Modal khusus untuk hapus materi */
.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #ddd;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.btn-delete-confirm {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.btn-delete-confirm:hover {
    background-color: #c0392b;
}

.warning-text {
    color: #e74c3c;
    background-color: #fadbd8;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9rem;
}

.warning-text i {
    margin-right: 5px;
}

/* Section header dengan action buttons */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.8rem;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Konfirmasi hapus inline */
.confirmation-section {
    margin: 15px 0;
    padding: 15px;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    animation: fadeIn 0.3s ease-in-out;
}

.confirmation-box h4 {
    margin: 0 0 10px 0;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.confirmation-box p {
    margin: 5px 0;
    color: #856404;
}

.confirmation-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.delete-form {
    display: flex;
    gap: 10px;
    width: 100%;
}

/* Tombol kecil */
.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-success {
    background-color: #2ecc71;
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #d68910;
}

.btn-admin {
    background-color: #9b59b6;
    color: white;
}

.btn-admin:hover {
    background-color: #8e44ad;
}

.btn-dosen {
    background-color: #3498db;
    color: white;
}

.btn-dosen:hover {
    background-color: #2980b9;
}

.btn-mahasiswa {
    background-color: #2ecc71;
    color: white;
}

.btn-mahasiswa:hover {
    background-color: #27ae60;
}

/* Statistik tambahan */
.stat-admin {
    background-color: #9b59b6;
}

.stat-pendaftaran {
    background-color: #1abc9c;
}

.stat-pertumbuhan {
    background-color: #e67e22;
}

/* Admin features yang lebih baik */
.admin-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #3498db;
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 20px;
}

.feature-content {
    flex: 1;
}

.feature-content h3 {
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.feature-content p {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
}

.feature-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Badge baru */
.info-badge {
    margin-top: 10px;
}

.badge-new {
    background-color: #2ecc71;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

/* Animasi */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .mata-kuliah-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .materi-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .admin-features {
        grid-template-columns: 1fr;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .feature-actions {
        justify-content: center;
    }
    
    .delete-form {
        flex-direction: column;
    }
    
    .delete-form button {
        width: 100%;
    }
    
    .materi-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .materi-actions {
        align-self: flex-end;
    }
    
    .materi-footer-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}