/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header h1 {
    display: inline-block;
}

header nav {
    float: right;
    margin-top: 10px;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 16px;
    border-radius: 5px;
    transition: background 0.3s;
}

header nav a:hover {
    background: rgba(255,255,255,0.2);
}

header nav span {
    margin-right: 20px;
    font-weight: bold;
}

/* Main Content */
main {
    padding: 40px 0;
    min-height: 70vh;
}

h2 {
    margin-bottom: 20px;
    color: #2d3748;
}

/* Grid Materi */
.materi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.materi-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.materi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.materi-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnail-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: white;
    border-radius: 8px;
}

.materi-card h3 {
    margin: 15px 0 10px 0;
    color: #2d3748;
}

.materi-card p {
    color: #718096;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #48bb78;
    color: white;
}

.btn-success:hover {
    background: #38a169;
}

.btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-small {
    padding: 5px 12px;
    font-size: 12px;
}

/* Forms */
.form-container {
    background: white;
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Tables */
.admin-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.admin-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-table th {
    padding: 12px 15px;
    text-align: left;
}

.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table tbody tr:hover {
    background: #f7fafc;
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    color: #718096;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

.alert-info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-warning {
    background: #fefcbf;
    color: #744210;
}

.badge-success {
    background: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background: #fed7d7;
    color: #742a2a;
}

/* Learning Layout */
.learning-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.sesi-sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.sesi-sidebar h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.sesi-list {
    list-style: none;
}

.sesi-list li {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.sesi-list li:hover {
    background: #f7fafc;
}

.sesi-list li.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.sesi-list li.completed {
    background: #f0fff4;
    color: #22543d;
}

.sesi-number {
    font-weight: bold;
    display: block;
    font-size: 12px;
    color: #a0aec0;
}

.sesi-list li.active .sesi-number {
    color: rgba(255,255,255,0.8);
}

.sesi-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sesi-content h2 {
    margin-bottom: 10px;
}

/* Video */
.video-section {
    margin: 30px 0;
}

.video-item {
    margin-bottom: 25px;
}

.video-item h4 {
    margin-bottom: 10px;
    color: #2d3748;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #1a202c;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Quiz */
.quiz-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.quiz-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.quiz-item p {
    margin-bottom: 10px;
}

.quiz-options label {
    display: block;
    padding: 8px 12px;
    margin: 5px 0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.quiz-options label:hover {
    background: #edf2f7;
}

.quiz-options input[type="radio"] {
    margin-right: 10px;
}

/* Sertifikat Info */
.sertifikat-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.sertifikat-info h3 {
    color: #2a4365;
    margin-bottom: 10px;
}

/* Footer */
footer {
    background: #2d3748;
    color: #a0aec0;
    padding: 20px 0;
    text-align: center;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    header nav {
        float: none;
        display: block;
        margin-top: 15px;
    }
    
    header nav a {
        display: inline-block;
        margin: 5px 10px 5px 0;
        font-size: 14px;
    }
    
    .learning-container {
        grid-template-columns: 1fr;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .materi-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 10px;
    }
    
    /* Tambahkan di style.css */

/* Message Box */
.message-box {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.message-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}
.message-info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #90cdf4;
}

/* Sesi Sidebar */
.sesi-sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: fit-content;
}
.sesi-sidebar h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}
.sesi-list {
    list-style: none;
    padding: 0;
}
.sesi-list li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #e2e8f0;
    transition: all 0.3s;
    cursor: default;
}
.sesi-list li.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-left-color: #48bb78;
}
.sesi-list li.completed {
    background: #f0fff4;
    border-left-color: #48bb78;
}
.sesi-list li.locked {
    background: #f7fafc;
    border-left-color: #fc8181;
    opacity: 0.7;
}
.sesi-list li.pending {
    background: #fffff0;
    border-left-color: #ecc94b;
}
.sesi-number {
    font-weight: bold;
    display: block;
    font-size: 11px;
    color: #a0aec0;
    margin-bottom: 2px;
}
.sesi-list li.active .sesi-number {
    color: rgba(255,255,255,0.8);
}

/* Badge Status */
.badge-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}
.badge-completed {
    background: #c6f6d5;
    color: #22543d;
}
.badge-locked {
    background: #fed7d7;
    color: #742a2a;
}
.badge-active {
    background: #bee3f8;
    color: #2a4365;
}
.badge-pending {
    background: #fefcbf;
    color: #744210;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.step {
    flex: 1;
    text-align: center;
    position: relative;
}
.step::before {
    content: '';
    position: absolute;
    top: 15px;
    left: -50%;
    right: 50%;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}
.step:first-child::before {
    display: none;
}
.step .circle {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    line-height: 30px;
    font-weight: bold;
    position: relative;
    z-index: 1;
}
.step.active .circle {
    background: #667eea;
    color: white;
}
.step.completed .circle {
    background: #48bb78;
    color: white;
}
.step.locked .circle {
    background: #fc8181;
    color: white;
}
.step .label {
    display: block;
    font-size: 12px;
    margin-top: 5px;
    color: #718096;
}
.step.active .label {
    color: #2d3748;
    font-weight: bold;
}

/* Learning Container */
.learning-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}
.sesi-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.video-section {
    margin: 20px 0;
}
.video-item {
    background: #f7fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
.quiz-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}
.quiz-item {
    background: #f7fafc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.quiz-options label {
    display: block;
    padding: 10px 15px;
    margin: 8px 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}
.quiz-options label:hover {
    border-color: #667eea;
    background: #f7fafc;
}
.quiz-options input[type="radio"] {
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .learning-container {
        grid-template-columns: 1fr;
    }
    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
        padding: 15px;
    }
    .step {
        flex: 0 0 33.33%;
    }
    .step::before {
        display: none;
    }
}
}