/* Global Styles */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Container Responsif */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Background Gradients */
.header-gradient {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
}

.footer-gradient {
    background: linear-gradient(135deg, #7C3AED 0%, #4F46E5 100%);
}

/* Warna Kuning Keemasan untuk Ikon dan Teks di Header */
.gold-icon {
    color: #FFD700; /* Warna kuning keemasan */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); 
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
}

.gold-text {
    color: #FFD700; /* Hanya menggunakan warna solid tanpa efek */
    font-weight: bold;
}

/* Form Elements */
.form-input {
    width: 100%;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
}

.form-input:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-select {
    width: 100%;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.form-select:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-textarea {
    width: 100%;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 120px;
    background-color: white;
}

.form-textarea:focus {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid #D1D5DB;
    cursor: pointer;
    transition: all 0.2s;
}

.form-checkbox:checked {
    background-color: #4F46E5;
    border-color: #4F46E5;
}

.checkbox-label {
    margin-left: 8px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid #E5E7EB;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

.btn-secondary:hover {
    background: #E5E7EB;
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #0EA5E9 0%, #3B82F6 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.2);
}

.btn-reset {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2);
    background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%);
}

.btn-download {
    background: #10B981;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-download:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
}

/* Tables */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.table-output {
    width: 100%;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    min-width: 600px;
}

.table-output th {
    background: #F9FAFB;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #E5E7EB;
    white-space: nowrap;
}

.table-output td {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    color: #4B5563;
    word-break: break-word;
}

.table-output tr:last-child td {
    border-bottom: none;
}

.table-output tr:hover td {
    background-color: #F9FAFB;
}

/* List Items */
.kegiatan-item {
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.kegiatan-item:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #4F46E5;
    font-weight: bold;
}

.sub-item {
    margin-bottom: 6px;
    padding-left: 40px;
    position: relative;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.4;
}

.sub-item:before {
    content: "◦";
    position: absolute;
    left: 24px;
    color: #7C3AED;
    font-weight: bold;
}

/* Badge Model */
.badge-model {
    display: inline-block;
    background: #7C3AED;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Checkbox Grid */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

/* Heart Icon Animation */
.heart-icon {
    color: #EF4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

/* Alert */
.alert {
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

/* Card Hover Effects */
.bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Input Validation */
.border-red-500 {
    border-color: #EF4444 !important;
}

.border-red-500:focus {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4F46E5;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Modal Styling */
body.modal-open {
    overflow: hidden;
}

#petunjukModal {
    z-index: 9999;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#petunjukModal .bg-white {
    animation: modalFadeIn 0.3s ease-out;
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet & Small Laptop (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .header-gradient {
        padding: 1.5rem !important;
    }
    
    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .header-gradient {
        padding: 1.25rem !important;
    }
    
    .header-gradient h1 {
        font-size: 2rem !important;
    }
    
    .header-gradient h2 {
        font-size: 1.25rem !important;
    }
    
    .header-gradient p {
        font-size: 0.9rem !important;
    }
    
    .bg-white.p-6 {
        padding: 1.25rem !important;
    }
    
    .checkbox-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .form-input, .form-select, .form-textarea {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .table-output th,
    .table-output td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .kegiatan-item, .sub-item {
        font-size: 13px;
    }
}

/* Mobile Landscape (640px and below) */
@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 0.75rem;
    }
    
    .header-gradient {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .header-gradient h1 {
        font-size: 1.75rem !important;
    }
    
    .header-gradient h2 {
        font-size: 1.1rem !important;
    }
    
    .header-gradient p {
        font-size: 0.85rem !important;
    }
    
    .gold-icon {
        font-size: 2rem !important;
    }
    
    .bg-white.p-6 {
        padding: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Form Layout - Single Column */
    #rpmForm {
        gap: 1rem !important;
    }
    
    #rpmForm > div {
        width: 100% !important;
    }
    
    .bg-indigo-50.p-6 {
        padding: 1rem !important;
    }
    
    /* Checkbox Grid - Single Column */
    .checkbox-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Button Stack Vertically */
    .flex-col.sm\:flex-row {
        flex-direction: column !important;
    }
    
    .btn-primary, .btn-info, .btn-reset {
        width: 100%;
        margin-bottom: 0.5rem;
        min-height: 48px;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    /* Praktik Pedagogis Inputs */
    #praktikPedagogisInputs {
        grid-template-columns: 1fr !important;
        gap: 0.75rem;
    }
    
    /* Table Improvements - PERBAIKAN 2: TABEL RESPONSIF UNTUK MOBILE */
    .table-container {
        border-radius: 8px;
        border: 1px solid #E5E7EB;
    }
    
    .table-output {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        min-width: 100%;
        font-size: 12px;
    }
    
    .table-output tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #E5E7EB;
        border-radius: 8px;
    }
    
    .table-output td,
    .table-output th {
        display: block;
        text-align: right;
        padding: 10px 8px;
        font-size: 12px;
        border-bottom: 1px solid #E5E7EB;
    }
    
    .table-output td:before,
    .table-output th:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #374151;
    }
    
    .table-output th {
        background-color: #F9FAFB;
        border-bottom: 2px solid #E5E7EB;
    }
    
    .table-output td:last-child {
        border-bottom: none;
    }
    
    /* Output Container */
    #outputContainer .flex-col.md\:flex-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    #downloadRPM {
        margin-top: 1rem;
        width: 100%;
        justify-content: center;
    }
    
    /* Tanda Tangan */
    .mt-12.pt-8.grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    
    /* Footer */
    .footer-gradient {
        padding: 1rem !important;
        margin-top: 1.5rem !important;
    }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .header-gradient h1 {
        font-size: 1.5rem !important;
    }
    
    .header-gradient h2 {
        font-size: 1rem !important;
    }
    
    .gold-icon {
        font-size: 1.75rem !important;
        margin-right: 0.75rem !important;
    }
    
    h3.text-2xl {
        font-size: 1.25rem !important;
    }
    
    h4.font-bold.text-xl {
        font-size: 1.125rem !important;
    }
    
    .form-input, .form-select, .form-textarea {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .form-textarea {
        min-height: 100px;
    }
    
    .btn-primary, .btn-info, .btn-reset {
        font-size: 13px;
        padding: 10px 14px;
        min-height: 44px;
    }
    
    .btn-download {
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .alert {
        padding: 12px;
        font-size: 12px;
    }
    
    /* Modal Responsive - PERBAIKAN 4: MODAL FULLSCREEN UNTUK MOBILE */
    #petunjukModal {
        padding: 0;
    }
    
    #petunjukModal .bg-white {
        margin: 0;
        border-radius: 0;
        width: 100%;
        height: 100vh;
        max-height: 85vh;
    }
    
    #petunjukModal .header-gradient {
        padding: 1rem !important;
        border-radius: 0;
    }
    
    #petunjukModal h3.text-2xl {
        font-size: 1.1rem !important;
    }
    
    #petunjukModal .p-6 {
        padding: 0.75rem !important;
    }
    
    #petunjukModal .grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    #petunjukModal .btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Very Small Mobile (360px and below) */
@media (max-width: 360px) {
    html {
        font-size: 12px;
    }
    
    .header-gradient h1 {
        font-size: 1.25rem !important;
    }
    
    .header-gradient h2 {
        font-size: 0.9rem !important;
    }
    
    .btn-primary, .btn-info, .btn-reset {
        font-size: 12px;
        padding: 8px 12px;
        min-height: 40px;
    }
    
    .btn-primary i, .btn-info i, .btn-reset i {
        margin-right: 0.5rem;
    }
    
    .table-output th,
    .table-output td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .kegiatan-item, .sub-item {
        font-size: 11px;
    }
}

/* Touch Device Optimizations - PERBAIKAN 3: TARGET TOUCH YANG LEBIH BESAR */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover, 
    .btn-info:hover, 
    .btn-reset:hover, 
    .btn-secondary:hover, 
    .btn-download:hover {
        transform: none;
    }
    
    .form-input, .form-select, .form-textarea {
        font-size: 16px; /* Prevents iOS zoom on focus */
        min-height: 44px; /* Minimum touch target size */
    }
    
    /* Increase tap target size for mobile */
    .form-checkbox {
        width: 22px;
        height: 22px;
    }
    
    .checkbox-label {
        padding: 4px 0;
    }
    
    /* Tambahan untuk touch target yang lebih besar */
    .btn-primary,
    .btn-info,
    .btn-reset,
    .btn-download {
        min-height: 48px;
        padding: 16px 24px;
    }
    
    .form-checkbox {
        width: 24px;
        height: 24px;
    }
    
    .checkbox-label {
        padding: 8px 0;
        margin-left: 10px;
    }
}

/* Print Styles */
@media print {
    .header-gradient,
    .footer-gradient,
    #alertContainer,
    #petunjukModal,
    #petunjukBtn,
    #resetForm,
    #downloadRPM,
    .btn-primary,
    .btn-info,
    .btn-reset,
    .btn-download {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .bg-white {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .table-output {
        break-inside: avoid;
    }
}
/* Styling untuk daftar berurut di output */
.table-output ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

.table-output ol ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: lower-alpha;
}

.table-output ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.table-output ul ul {
    list-style-type: circle;
}

/* Styling untuk langkah dalam sintaks */
.sintaks-langkah {
    margin-bottom: 1rem;
}

.sintaks-langkah strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
}

.sintaks-sub-langkah {
    margin-left: 1.5rem;
    margin-bottom: 0.25rem;
}
/* Tambahkan di akhir file style.css */
/* Styling untuk teks berkesadaran, bermakna, menggembirakan */
.experience-note {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.experience-note i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.text-yellow-500 {
    color: #f59e0b;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.text-green-500 {
    color: #10b981;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.border-purple-200 {
    border-color: #e9d5ff;
}

.text-purple-500 {
    color: #8b5cf6;
}
/* TAMBAHKAN DI AKHIR FILE STYLE.CSS (setelah bagian .asesmen-content) */

/* Styling khusus untuk teks assessment as learning 
.assessment-as-learning-text {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    color: #1F2937 !important;
    font-weight: 600 !important;
    margin-top: 8px !important;
} */

.assessment-as-learning-text strong {
    font-size: 1.1rem !important;
    color: #4F46E5 !important;
}

/* Responsif untuk assessment as learning */
@media (max-width: 768px) {
    .assessment-as-learning-text {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .assessment-as-learning-text strong {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .assessment-as-learning-text {
        font-size: 0.95rem !important;
        line-height: 1.4 !important;
    }
}
img {
    max-width: 100%;
    height: auto;
}