/* --- CSS UTAMA --- */
:root {
    --primary: #6366f1; --primary-dark: #4f46e5; --primary-light: #818cf8; --secondary: #f472b6;
    --dark: #f8fafc; --darker: #e2e8f0; --light: #0f172a; --gray: #475569;
    --success: #10b981; --warning: #f59e0b; --danger: #ef4444;
    --success-bg: #dcfce7; --warning-bg: #fef3c7; --danger-bg: #fee2e2;
    --success-text: #065f46; --warning-text: #92400e; --danger-text: #991b1b;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-hover: #f8fafc; --border-color: #e2e8f0;
    --input-bg: #ffffff; --input-border: #cbd5e1; --input-focus-bg: #ffffff; --input-focus-border: var(--primary); --input-focus-shadow: rgba(99, 102, 241, 0.2);
    --pre-bg: #eef2f9;
    --pre-border: #e2e8f0; --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 4rem;
}

body[data-theme="dark"] {
    --dark: #000000;
    --darker: #000000;
    --light: #f8fafc; --gray: #94a3b8;
    --success-bg: #052e16; --warning-bg: #422006; --danger-bg: #450a0a;
    --success-text: #6ee7b7; --warning-text: #fcd34d; --danger-text: #fca5a5;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-hover: rgba(255, 255, 255, 0.08);
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05); --input-border: rgba(255, 255, 255, 0.2); --input-focus-bg: rgba(255, 255, 255, 0.1); --input-focus-border: var(--primary-light); --input-focus-shadow: rgba(99, 102, 241, 0.2);
    --pre-bg: rgba(0, 0, 0, 0.3); --pre-border: rgba(255, 255, 255, 0.1);
}

html { scroll-behavior: smooth; }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-image: url('/images/background.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--light);
    padding: 0; 
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent; line-height: 1.5;
    transition: background 0.3s ease, color 0.3s ease;
    position: relative;
    z-index: 1;
    background-color: var(--darker); 
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: -1;
    transition: background-color 0.3s ease;
}

body[data-theme="dark"] {
    background-image: none;
    background: linear-gradient(135deg, var(--darker), var(--dark));
}
body[data-theme="dark"]::before {
    background-color: rgba(0, 0, 0, 0);
}

.d-none { display: none !important; }
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--dark); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 1; transition: opacity 0.5s ease-out, visibility 0s 0.5s; visibility: visible; }
#preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-content { text-align: center; }
.pulsing-logo { width: 60px; height: 60px; animation: pulse 1.5s infinite ease-in-out; margin-bottom: 1rem; border-radius: 8px; }
.loader-content p { color: var(--primary); font-weight: 500; font-size: 1rem; animation: fadeInOut 1.5s infinite ease-in-out; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes fadeInOut { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
pre, #apiResponseContent { white-space: pre-wrap; word-wrap: break-word; overflow-x: auto; background: var(--pre-bg); color: var(--light); padding: 1rem; border-radius: 8px; max-height: 400px; font-size: 0.875rem; font-family: 'Consolas', 'Menlo', 'Courier New', monospace; border: 1px solid var(--pre-border); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); font-weight: 600; line-height: 1.6; }
.json-key { color: #c991e1; font-weight: 700; }
.json-string { color: #86c166; }
.json-number { color: #f59e0b; }
.json-boolean { color: #6366f1; font-weight: 700; }
.json-null { color: var(--gray); font-style: italic; }
#apiResponseContent.blacklist-info { color: var(--danger-text); }
#apiResponseContent.blacklist-info hr { border-color: var(--border-color); margin: 0.5rem 0; }
#apiResponseContent.blacklist-info .user-ip-label { color: var(--light); font-weight: bold; }
#apiResponseContent.blacklist-info .user-ip-value { color: var(--primary-light); font-family: monospace; }
#apiResponseContent.blacklist-info .list-title { color: var(--light); font-weight: bold; }
#apiResponseContent.blacklist-info .empty-list { color: var(--gray); }

.modal-body form label { display: block; font-weight: 500; margin-bottom: 6px; color: var(--gray); font-size: 0.9rem; }
.modal-body form input, .modal-body form textarea, .modal-body form select { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--light); margin-bottom: 1rem; font-size: 0.95rem; font-family: inherit; transition: var(--transition); }
.modal-body form textarea { min-height: 100px; resize: vertical; }
.modal-body form input::placeholder, .modal-body form textarea::placeholder { color: var(--gray); opacity: 0.7; }
.modal-body form input:focus, .modal-body form textarea:focus, .modal-body form select:focus { outline: none; border-color: var(--input-focus-border); background: var(--input-focus-bg); box-shadow: 0 0 0 3px var(--input-focus-shadow); }
#submitParamBtn, #submitReportBtn { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; padding: 12px 24px; font-size: 0.95rem; border-radius: 8px; font-family: inherit; cursor: pointer; font-weight: 500; transition: var(--transition); width: 100%; margin-top: 0.5rem; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); display: flex; align-items: center; justify-content: center; gap: 8px; }
#submitParamBtn:hover, #submitReportBtn:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); transform: translateY(-2px); box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); }
#submitParamBtn:active, #submitReportBtn:active { transform: translateY(0); }
#submitReportBtn:disabled { background: var(--gray); cursor: not-allowed; opacity: 0.7; transform: none; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); }
.loading-spinner { margin: 1rem auto; border: 3px solid var(--card-bg); border-top: 3px solid var(--primary-light); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal { position: fixed; top: 0; left: 0; z-index: 100; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal.active { opacity: 1; pointer-events: all; }
.modal-dialog { width: 100%; max-width: 500px; background: var(--dark); border-radius: 12px; padding: 1.5rem; color: var(--light); overflow: auto; max-height: 90vh; transform: translateY(20px); transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease; opacity: 0; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); border: 1px solid var(--border-color); }
.modal.active .modal-dialog { transform: translateY(0); opacity: 1; }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; transition: border-color 0.3s ease; }
.modal-header h5 { font-size: 1.25rem; font-weight: 600; color: var(--light); }
.modal-header span { font-size: 0.9rem; color: var(--gray); display: block; margin-top: 4px; font-weight: 400; }
.btn-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--gray); transition: var(--transition); padding: 0.25rem; border-radius: 4px; }
.btn-close:hover { color: var(--light); background: var(--card-hover); }
.modal-body { padding: 0.5rem 0; }
.copy-section { display: none; justify-content: space-between; align-items: center; background-color: var(--pre-bg); border: 1px solid var(--border-color); padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 1rem; overflow: auto; transition: var(--transition); }
.copy-section span { color: var(--gray); word-break: break-all; }
.copy-section.active { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.copy-button { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; color: white; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 4px; font-weight: 500; font-family: inherit; white-space: nowrap; }
.copy-button:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); transform: translateY(-1px); }
.copy-button:active { transform: translateY(0); }
#copyResponseBtn { margin-bottom: 0.75rem; width: auto; padding: 6px 12px; font-size: 0.8rem; margin-left: auto; margin-right: 0; display: flex; }
#main-api-page {
    padding: calc(var(--header-height) + 1rem) 1rem 1rem 1rem;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0; }
.hero { text-align: center; margin: 1.5rem auto 2rem auto; max-width: 800px; padding: 0 1rem; }
.api-platform-badge { display: inline-flex; align-items: center; gap: 0.5rem; background-color: var(--card-bg); color: var(--primary); padding: 0.4rem 0.9rem; border-radius: 20px; font-size: 0.9rem; font-weight: 500; border: 1px solid var(--border-color); margin-bottom: 1rem; transition: var(--transition); cursor: pointer; }
.api-platform-badge:hover { background-color: var(--card-hover); box-shadow: 0 4px 8px rgba(0,0,0,0.1); transform: translateY(-2px); }
body[data-theme="dark"] .api-platform-badge { color: var(--primary-light); }
.hero-header { margin-bottom: 0.75rem; }
.hero h2 { font-size: 2.5rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; text-align: center; }
body[data-theme="dark"] .hero h2 { background: linear-gradient(90deg, #a5b4fc, #818cf8, #6366f1, #818cf8, #a5b4fc); background-size: 300% 300%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: gradient 8s ease infinite; }
@keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.hero p { 
    font-size: 1.1rem; 
    color: var(--gray); 
    margin-bottom: 1.5rem; 
    line-height: 1.6; 
    text-align: center; 
    max-width: 600px; 
    margin-left: auto; 
    margin-right: auto;
    word-break: break-word;
}

.version-label {
    font-size: 0.8rem; font-weight: 500; color: var(--primary); background-color: var(--card-bg);
    padding: 3px 8px; border-radius: 6px; margin-left: 0.5rem; vertical-align: middle;
    border: 1px solid var(--border-color); transition: var(--transition);
}
body[data-theme="dark"] .version-label { color: var(--primary-light); background-color: var(--card-bg); border-color: var(--border-color); }

.top-navbar { position: fixed; top: 0; left: 0; width: 100%; height: var(--header-height); background: var(--darker); box-shadow: 0 2px 5px rgba(0,0,0,0.1); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; z-index: 50; transition: background 0.3s ease; }
.navbar-logo { display: flex; align-items: center; flex-shrink: 0; cursor: pointer; }
.navbar-logo img { height: 32px; width: 32px; border-radius: 4px; }
.navbar-scrolling-text-wrapper { flex-grow: 1; overflow: hidden; margin: 0 1.5rem; display: flex; align-items: center; }
.navbar-theme-switcher { flex-shrink: 0; }
.scrolling-text-container { width: 100%; overflow: hidden; white-space: nowrap; line-height: normal; background: transparent; }
.scrolling-text { display: inline-block; padding-left: 100%; animation: scroll-left 20s linear infinite, gradient-shift 10s ease infinite alternate; font-size: 1.1rem; font-weight: 500; background: linear-gradient(90deg, #ef4444, #f97316, #eab308, #84cc16, #22c55e, #14b8a6, #0ea5e9, #6366f1, #a855f7, #ec4899, #ef4444); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; vertical-align: middle; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }
@keyframes gradient-shift { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

.theme-toggle-button { background: transparent; border: none; color: var(--gray); width: 44px; height: 44px; border-radius: 50%; font-size: 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); padding: 0; }
.theme-toggle-button:hover { background: var(--card-hover); color: var(--primary); }
.theme-toggle-button .fa-sun { color: #f59e0b; }
.theme-toggle-button .fa-moon { color: #818cf8; }

#donationQR { max-width: 180px; height: 180px; border-radius: 8px; background: white; padding: 5px; margin: 0 auto 1rem auto; display: block; cursor: zoom-in; transition: transform 0.2s ease; }
#donationQR:hover { transform: scale(1.05); }
.donation-controls { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; }
#dontShowAgainCheckbox { width: 16px; height: 16px; accent-color: var(--primary); }
.donation-controls label { color: var(--gray); font-size: 0.9rem; cursor: pointer; margin-bottom: 0; }

.donation-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; 
    width: 100%;
}
.donation-buttons-container .play-button {
    width: 100%;
    margin-top: 0; 
    justify-content: center; 
    text-decoration: none; 
}

.products-section { background: var(--card-bg); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 2rem; text-align: center; margin-left: 1rem; margin-right: 1rem; }
.products-section h2 { font-size: 1.5rem; font-weight: 600; color: var(--light); margin-bottom: 0.5rem; }
.products-section p { color: var(--gray); margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.product-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.products-section .play-button { text-decoration: none; align-self: center; margin-top: 0; display: inline-flex; justify-content: center; flex-grow: 1; min-width: 150px; }
.play-button.btn-secondary { background: var(--card-hover); color: var(--primary); border: 1px solid var(--primary-light); box-shadow: none; }
.play-button.btn-secondary:hover { background: var(--primary-light); color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2); }
body[data-theme="dark"] .play-button.btn-secondary { color: var(--primary-light); border-color: var(--primary); background: rgba(255, 255, 255, 0.08);}
body[data-theme="dark"] .play-button.btn-secondary:hover { background: var(--primary); color: white; }
.stats { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); 
    gap: 1rem; 
    margin-bottom: 2rem; 
    padding: 0 1rem; 
}
.stats div { background: var(--card-bg); padding: 1.5rem 1rem; border-radius: 12px; text-align: center; transition: var(--transition); border: 1px solid var(--border-color); }
.stats div:hover { transform: translateY(-5px); background: var(--card-hover); box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.stats h3 { font-size: 0.95rem; opacity: 0.8; color: var(--gray); margin-bottom: 0.5rem; font-weight: 500; }
.stats p { font-size: 1.5rem; font-weight: 700; color: var(--light); }

.content { padding: 0 1rem; }
.search-container { margin-bottom: 1.5rem; }
#apiSearchInput { width: 100%; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--light); font-size: 1rem; font-family: inherit; transition: var(--transition); box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
#apiSearchInput::placeholder { color: var(--gray); opacity: 0.7; }
#apiSearchInput:focus { outline: none; border-color: var(--input-focus-border); background: var(--input-focus-bg); box-shadow: 0 0 0 3px var(--input-focus-shadow), 0 2px 4px rgba(0,0,0,0.05); }
.content h2 { font-size: 1.5rem; color: var(--light); margin-bottom: 1rem; font-weight: 600; }

.tabs { display: flex; gap: 1rem; overflow-x: auto; margin-bottom: 1.5rem; padding-bottom: 6px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; height: 0; }
.tab { background: none; color: var(--gray); border: none; font-weight: 500; border-bottom: 2px solid transparent; padding: 0.75rem 0; cursor: pointer; font-size: 1rem; white-space: nowrap; transition: var(--transition); position: relative; font-family: inherit; }
.tab.active { color: var(--light); border-color: var(--primary); }
.tab:after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--primary); transition: var(--transition); }
.tab:hover:not(.active):after { width: 100%; }

.api-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); 
    gap: 1rem; 
    margin-bottom: 3rem; 
}
.api-card { background: var(--card-bg); padding: 1.25rem; border-radius: 12px; transition: var(--transition); border: 1px solid var(--border-color); display: flex; flex-direction: column; justify-content: space-between; min-height: 180px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.api-card:hover { transform: translateY(-5px); background: var(--card-hover); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); border-color: var(--border-color); }
.api-info h3 { font-size: 1.2rem; color: var(--light); font-weight: 600; margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: space-between; overflow: hidden; }

.api-info h3 .new-label {
    background-color: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    animation: pulse-danger 1.5s infinite;
    margin-left: 8px;
    line-height: 1.2;
    flex-shrink: 0; 
}
@keyframes pulse-danger { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }
@keyframes pulse-success { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.8; } }

.api-name-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.api-info p {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.5 * 0.95rem * 2); 
    word-break: break-word; 
}

.status { padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.75rem; display: inline-block; font-weight: 500; margin-top: 0.5rem; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; }
.status { background: rgba(16, 185, 129, 0.15); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); } 
.status.warning, .status.beta, .status.maintenance { background: rgba(245, 158, 11, 0.15); color: var(--warning); border-color: rgba(245, 158, 11, 0.3); } 
.status.danger, .status.error, .status.down { background: rgba(239, 68, 68, 0.15); color: var(--danger); border-color: rgba(239, 68, 68, 0.3); } 
body[data-theme="light"] .status { border: 1px solid transparent; } 
body[data-theme="light"] .status.warning, body[data-theme="light"] .status.beta, body[data-theme="light"] .status.maintenance { border: 1px solid transparent; }
body[data-theme="light"] .status.danger, body[data-theme="light"] .status.error, body[data-theme="light"] .status.down { border: 1px solid transparent; }

.play-button { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; border-radius: 8px; padding: 0.75rem 1.5rem; color: white; cursor: pointer; font-size: 0.95rem; font-weight: 500; text-align: center; transition: var(--transition); align-self: flex-start; margin-top: 1rem; display: flex; align-items: center; gap: 8px; font-family: inherit; justify-content: center; }
.play-button:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.play-button:active { transform: translateY(0); }
#retryRequestBtn { margin-top: 0.5rem; width: 100%; }

.footer { text-align: center; padding: 2rem 1rem 1rem 1rem; color: var(--gray); font-size: 0.9rem; border-top: 1px solid var(--border-color); margin-top: 2rem; transition: color 0.3s ease, border-color 0.3s ease; }
.contact { margin-top: 1rem; display: flex; justify-content: center; gap: 1rem; }
.contact a { color: var(--gray); text-decoration: none; font-size: 1.25rem; transition: var(--transition); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--card-bg); border: 1px solid var(--border-color); }
.contact a:hover { color: white; background: var(--primary); transform: translateY(-3px); box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3); border-color: var(--primary); }
body[data-theme="light"] .contact a:hover { color: white; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeInUp 0.6s ease forwards; opacity: 0; } 

.qr-lightbox-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.8); display: flex; align-items: center; justify-content: center; z-index: 101; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; cursor: zoom-out; }
.qr-lightbox-overlay.active { opacity: 1; pointer-events: all; }
#lightboxImage { max-width: 90vw; max-height: 90vh; width: auto; height: auto; background: white; padding: 10px; border-radius: 12px; cursor: default; transform: scale(0.8); transition: transform 0.3s ease; }
.qr-lightbox-overlay.active #lightboxImage { transform: scale(1); }

#musicFabContainer { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 90; display: none; }
#fabToggleBtn { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border: none; color: white; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.2); transition: var(--transition); }
#fabToggleBtn:hover { transform: scale(1.05); box-shadow: 0 6px 16px rgba(0,0,0,0.25); }
#musicControlsExpanded { position: absolute; bottom: calc(100% + 0.75rem); right: 0; display: none; flex-direction: column; align-items: center; gap: 0.75rem; background: var(--card-bg); padding: 1rem; border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,0.2); border: 1px solid var(--border-color); transition: opacity 0.3s ease, transform 0.3s ease; opacity: 0; transform: translateY(10px); pointer-events: none; }
#musicControlsExpanded.active { display: flex; opacity: 1; transform: translateY(0); pointer-events: auto; }
#musicControlsExpanded button { background: none; border: none; color: var(--gray); font-size: 1.1rem; cursor: pointer; padding: 0.3rem; line-height: 1; transition: color 0.2s ease, transform 0.2s ease; }
#musicControlsExpanded button:hover { color: var(--light); transform: scale(1.1); }
#volumeSlider { width: 100px; height: 5px; cursor: pointer; accent-color: var(--primary); margin-top: 0.2rem; }
#volumeSlider::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; }
#volumeSlider::-moz-range-thumb { width: 14px; height: 14px; background: var(--primary); border-radius: 50%; border: none; }

#notification { position: fixed; top: 0; left: 50%; transform: translateX(-50%) translateY(-120%); min-width: 250px; max-width: 90%; padding: 0.9rem 1.5rem; border-radius: 8px; background-color: var(--card-bg); color: var(--light); text-align: center; font-size: 0.95rem; font-weight: 500; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); z-index: 1000; transition: transform 0.4s ease-in-out, background-color 0.3s ease, color 0.3s ease; border: 1px solid var(--border-color); }
#notification.show { transform: translateX(-50%) translateY(20px); }
#notification.error { background-color: var(--danger-bg); color: var(--danger-text); border-color: var(--danger); }
#notification.success { background-color: var(--success-bg); color: var(--success-text); border-color: var(--success); }
#notification.warning { background-color: var(--warning-bg); color: var(--warning-text); border-color: var(--warning); }

.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.6); z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.sidebar-overlay.active { opacity: 1; pointer-events: all; }
.sidebar-menu { position: fixed; top: 0; left: 0; width: 280px; height: 100vh; background: var(--dark); z-index: 901; transform: translateX(-100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; border-right: 1px solid var(--border-color); }
.sidebar-menu.active { transform: translateX(0); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 0 1rem; height: var(--header-height); background: var(--primary); color: white; flex-shrink: 0; }
.sidebar-header span { font-size: 1.1rem; font-weight: 600; }
.sidebar-header .btn-close { color: rgba(255, 255, 255, 0.8); font-size: 1.8rem; }
.sidebar-header .btn-close:hover { color: white; background: none; }
.sidebar-nav { padding: 1rem; overflow-y: auto; flex-grow: 1; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 1rem; border-radius: 8px; color: var(--gray); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: var(--transition); }
.sidebar-nav a:hover { background: var(--card-hover); color: var(--light); }
.sidebar-nav a i { width: 20px; text-align: center; font-size: 1.1rem; color: var(--primary-light); }
body[data-theme="light"] .sidebar-nav a i { color: var(--primary); }
.sidebar-nav a:hover i { color: var(--primary); }
body[data-theme="dark"] .sidebar-nav a:hover i { color: var(--primary-light); }
.sidebar-nav .nav-section-title { color: var(--gray); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; padding: 1.5rem 1rem 0.5rem 1rem; letter-spacing: 0.5px; margin-bottom: 0.25rem; }

/* --- CSS Loader Awal (Estetik - Loader #1) --- */
#loader-wrapper {
    position: fixed;
    inset: 0;
    z-index: 10000; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--darker); 
    opacity: 1;
    transition: opacity 1s ease-out;
}
body[data-theme="dark"] #loader-wrapper {
     background-color: var(--darker);
}

#loader-wrapper .loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 8px solid rgba(150, 150, 150, 0.2); 
    border-top-color: var(--primary); 
    animation: spin 1s linear infinite;
}
body[data-theme="dark"] #loader-wrapper .loader {
     border: 8px solid rgba(255, 255, 255, 0.2);
     border-top-color: var(--primary); 
}

#loader-wrapper .loader-logo {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    animation: pulse 1.5s infinite ease-in-out;
}
#loader-wrapper p {
    color: var(--primary);
    font-weight: 500;
    font-size: 1.2rem;
    margin-top: 1.5rem;
    animation: fadeInOut 1.5s infinite ease-in-out;
}
body[data-theme="dark"] #loader-wrapper p {
     color: var(--primary-light);
}

#docs-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: var(--light);
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.1), transparent 40%), radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.1), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    visibility: hidden;
}
#docs-page.visible {
    opacity: 1;
    visibility: visible;
}

body[data-theme="dark"] #docs-page {
    background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.2), transparent 40%), radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.2), transparent 40%);
}

#docs-page .docs-logo {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    height: 40px;
    width: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#docs-page .docs-main {
    max-width: 900px; 
    width: 100%;
    text-align: center;
}

#datetime-widget {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    max-width: 320px; 
    margin-left: auto;
    margin-right: auto;
}
#datetime-widget #day {
    font-size: 1.5rem; 
    font-weight: 700;
    color: var(--light);
}
#datetime-widget #date {
    font-size: 1rem; 
    color: var(--primary);
}
body[data-theme="dark"] #datetime-widget #date {
     color: var(--primary-light);
}
#datetime-widget #time {
    font-size: 3rem; 
    font-weight: 900;
    color: var(--light);
    margin-top: 0.5rem;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
}

#docs-page h1 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--light);
    margin-bottom: 1rem;
}

#docs-page .text-gradient {
    background: linear-gradient(90deg, #4f46e5, #6366f1, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body[data-theme="dark"] #docs-page .text-gradient {
     background: linear-gradient(90deg, #a5b4fc, #818cf8, #6366f1);
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;
}


#docs-page .docs-subheadline {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.features-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 0; 
    text-align: left;
}

.feature-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-5px);
    background: var(--card-hover);
}
.feature-card .feature-icon {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 1.25rem;
}
body[data-theme="dark"] .feature-card .feature-icon {
    color: var(--primary-light);
}
.feature-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--light);
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.5;
}

#docs-page-button {
    padding: 1rem 2.5rem; 
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
    margin: 2.5rem auto;
}

@media (min-width: 768px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); }
    #docs-page h1 { font-size: 4rem; }
    #docs-page .docs-subheadline { font-size: 1.25rem; }
}

@media (max-width: 768px) {
    #main-api-page { padding: calc(var(--header-height) + 0.5rem) 0.5rem 0.5rem 0.5rem; }
    .hero { padding: 0 0.5rem; }
    .products-section, .stats, .content, .footer { padding-left: 0.5rem; padding-right: 0.5rem; margin-left: 0; margin-right: 0;} 
    .hero h2 { font-size: 2rem; } .hero p { font-size: 1rem; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    #musicFabContainer { bottom: 1rem; right: 1rem; }
    .top-navbar { padding: 0 1rem; }
    .navbar-scrolling-text-wrapper { margin: 0 1rem; }
    
    #docs-page h1 { font-size: 2.5rem; } 
    #docs-page .docs-subheadline { font-size: 1rem; }
    .features-grid { grid-template-columns: 1fr; } 
    #datetime-widget #time { font-size: 2.5rem; } 
    #docs-page-button { padding: 0.8rem 1.5rem; font-size: 1rem; }
}

@media (max-width: 480px) {
    #main-api-page { padding-top: calc(var(--header-height) + 0.5rem); }
    .hero h2 { font-size: 1.75rem; }
    .api-platform-badge { font-size: 0.8rem; padding: 0.3rem 0.7rem; }
    .stats { grid-template-columns: 1fr; } .modal-dialog { padding: 1.25rem; }
    .top-navbar { padding: 0 0.5rem; }
    .navbar-logo img { height: 28px; width: 28px; }
    .navbar-scrolling-text-wrapper { margin: 0 0.5rem; }
    .scrolling-text { font-size: 0.9rem; }
    .theme-toggle-button { width: 40px; height: 40px; font-size: 1.1rem; }
    .api-list { grid-template-columns: 1fr; }
    .products-section, .content, .footer { padding-left: 0.5rem; padding-right: 0.5rem; } 
    .product-buttons { flex-direction: column; }
    #musicFabContainer { bottom: 1rem; right: 1rem; }
    #musicControlsExpanded { right: 0; }
    .sidebar-menu { width: 260px; }

    #docs-page { padding: 1.5rem 0.5rem; }
    #docs-page .docs-logo { top: 1rem; left: 1rem; height: 32px; width: 32px;}
    #docs-page h1 { font-size: 2rem; }
    #datetime-widget { max-width: 280px; }
    #datetime-widget #day { font-size: 1.25rem; }
    #datetime-widget #date { font-size: 0.9rem; }
    #datetime-widget #time { font-size: 2.25rem; }
}
