:root {
    --indigo-dark: #3730a3;
    --indigo-main: #4f46e5;
    --indigo-pale: #eef2ff;
    --border-indigo: #a5b4fc;
    --bg-light: #F8F9FA;
}

body {
    background-color: var(--bg-light);
    font-family: system-ui, -apple-system, sans-serif;
}

/* Header */
.custom-header {
    background-color: var(--indigo-dark);
    color: white;
    padding: 15px 0;
}

/* Main Layout */
.main-flex-container {
    display: flex;
    min-height: auto;
}

@media (max-width: 768px) {
    .main-flex-container {
        flex-direction: column;
    }
}

.sidebar-menu {
    width: 25%;
    background: white;
    border-right: 1px solid #E0E0E0;
    padding: 20px;
}

@media (max-width: 768px) {
    .sidebar-menu {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1rem;
    }
}

.work-area {
    width: 75%;
    padding: 30px;
}

@media (max-width: 768px) {
    .work-area {
        width: 100%;
        padding: 1rem;
    }
}

/* Menu Items */
.menu-item {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333333;
    text-decoration: none;
}

.menu-item-icon {
    display: inline-block;
    width: 1.25rem;
    flex-shrink: 0;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1;
}

.menu-item.active {
    background-color: var(--indigo-pale);
    color: var(--indigo-dark);
    font-weight: bold;
}

.menu-item:hover {
    background-color: var(--indigo-pale) !important;
    color: var(--indigo-dark) !important;
    font-weight: bold !important;
}

.menu-item:hover * {
    color: var(--indigo-dark) !important;
}

.sidebar-info {
    font-size: 0.8rem;
    color: #94a3b8;
    padding: 0.5rem 0;
    border-top: 1px dashed #e2e8f0;
    margin-top: 1rem;
    line-height: 1.8;
}

/* Card & Tool Design */
.tool-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 25px;
}

.tool-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--indigo-dark);
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--indigo-main) !important;
    border-color: var(--indigo-main) !important;
}

.btn-primary:hover {
    background-color: var(--indigo-dark) !important;
}

/* Textareas / Inputs */
.mono-textarea {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: 0.2s;
}

.mono-textarea:focus {
    border-color: var(--border-indigo);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: none;
}

.output-textarea {
    background: #f8fafc !important;
    color: #0f172a;
}

.field-hint {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 4px;
}

.required-mark {
    color: #dc2626;
}

.pillar-tag {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--indigo-main);
    background: var(--indigo-pale);
    padding: 1px 8px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Honesty Note */
.honesty-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.honesty-note i {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: 0.15s all ease;
}

.drop-zone:hover,
.drop-zone.drop-zone-active {
    border-color: var(--indigo-main);
    background: var(--indigo-pale);
}

.drop-zone-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 10px;
    display: block;
}

.drop-zone-text {
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}

.drop-zone-subtext {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-bottom: 0;
}

.preview-image {
    max-width: 100%;
    max-height: 360px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    display: block;
}

/* Loading Box */
.loading-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--indigo-pale);
    color: var(--indigo-dark);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Stats Bar (character / word / token count) */
.stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: var(--bg-light);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #475569;
}

.stat-item span {
    font-weight: 700;
    color: var(--indigo-dark);
}

.btn-copy-inline {
    padding: 3px 10px;
    font-size: 0.78rem;
    margin-left: 8px;
}

/* Context Window Results */
.window-results-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.window-result-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.window-result-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.window-result-size {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1e293b;
}

.window-result-detail {
    font-size: 0.85rem;
    color: #64748b;
}

.window-fit-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 2px 10px;
    border-radius: 20px;
}

.window-fit-badge.fits {
    background: #d1fae5;
    color: #065f46;
}

.window-fit-badge.overflow {
    background: #fee2e2;
    color: #991b1b;
}

.window-progress-track {
    width: 100%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 7px;
    overflow: hidden;
}

.window-progress-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.2s ease;
}

.window-progress-fill.tone-low { background: #10b981; }
.window-progress-fill.tone-medium { background: #f59e0b; }
.window-progress-fill.tone-high { background: #f97316; }
.window-progress-fill.tone-over { background: #ef4444; }

/* Checkbox */
.custom-indigo-checkbox:checked {
    background-color: var(--indigo-main);
    border-color: var(--indigo-main);
}
.custom-indigo-checkbox:focus {
    border-color: var(--indigo-main);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Error Alert Box */
.error-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Copy Buttons */
.btn-copy {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    border-radius: 6px;
    transition: 0.2s;
}

.btn-copy:hover {
    background-color: var(--indigo-pale);
    border-color: var(--border-indigo);
    color: var(--indigo-dark);
}

.btn-copy.copy-success {
    background: #d1fae5;
    border-color: #a7f3d0;
    color: #065f46;
}

/* Info Section (About / Tips / Contact) */
.info-pages-full {
    background: white;
    margin: 30px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    clear: both;
}

.info-tabs-full {
    display: flex;
    border-bottom: 2px solid #E0E0E0;
    margin-bottom: 20px;
}

.info-tab-full {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.info-tab-full.active {
    border-bottom-color: var(--indigo-main);
    color: var(--indigo-main);
    font-weight: bold;
}

/* Prompting Tips Cheat Sheet */
.cheat-sheet-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cheat-row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 6px;
}
.cheat-row code {
    background: var(--indigo-pale);
    color: var(--indigo-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 130px;
    text-align: center;
}
.cheat-row span {
    color: #475569;
    font-size: 0.9rem;
}

/* Feedback Form */
.feedback-container-box {
    max-width: 650px;
    background: #f4f6f9;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.feedback-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}
.feedback-title i {
    color: var(--indigo-main);
}

.feedback-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.feedback-textarea, .feedback-input-email {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px 12px;
}
.feedback-textarea:focus, .feedback-input-email:focus {
    border-color: var(--border-indigo);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.btn-feedback-submit {
    background-color: var(--indigo-main);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}
.btn-feedback-submit:hover {
    background-color: var(--indigo-dark);
    color: white;
}

.custom-footer {
    padding: 20px 0;
    background: #eaeaea;
    border-top: 1px solid #ddd;
}

/* ============================================================
   AD BANNER -- disisipkan otomatis oleh apply-ad-css.php
   ============================================================ */
.ad-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
    background: #eef1f5;
}

.ad-banner.ad-top {
    padding: 10px 0;
    min-height: 90px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.ad-banner.ad-in-content {
    padding: 10px 0;
    min-height: 60px;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.ad-banner.ad-footer {
    padding: 10px 0;
    min-height: 90px;
    margin-bottom: 1rem;
    border-radius: 8px;
}

.ad-banner span {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 1px dashed #cbd5e1;
    padding: 8px 24px;
    border-radius: 4px;
}
