/* --- Reset & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* --- Layout Container --- */
.container {
    background-color: #ffffff;
    width: 100%;
    max-width: 1000px; /* Batas maksimal lebar agar tidak terlalu melar di desktop */
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
}

/* --- BARU: Kontainer Utama Input & Output --- */
.main-content {
    display: flex;
    flex-direction: column; /* Default atas-bawah untuk mobile */
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
    .main-content {
        flex-direction: row; /* Berubah jadi sampingan di desktop */
    }
    .form-group {
        flex: 1; /* Membagi lebar 50-50 secara otomatis */
        width: 50%;
    }
}

/* --- Header --- */
.header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}
.header p {
    font-size: 0.875rem;
    color: #64748b;
}

/* --- Panel Konfigurasi --- */
.config-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}
@media (min-width: 768px) {
    .config-panel {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.config-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    user-select: none;
}
.config-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}

/* --- Form Inputs --- */
.form-group {
    margin-bottom: 0; /* Jarak diatur oleh .main-content gap */
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}
.textarea-input {
    width: 100%;
    height: 200px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    outline: none;
    font-size: 16px;
    resize: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* --- Output Area --- */
.output-container {
    position: relative;
    width: 100%;
}
.output-box {
    font-family: 'Noto Sans Javanese', 'Tuladha Jejeg', 'Javanese Text', serif;
    width: 100%;
    padding: 15px;
    padding-bottom: 50px; /* Ruang agar teks tidak tertutup tombol salin */
    background-color: rgba(238, 242, 255, 0.5);
    border: 1px solid #e0e7ff;
    border-radius: 0.75rem;
    font-size: 24px;
    line-height: 1.8;
    color: #1e1b4b;
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    height: 200px;
    overflow-y: auto;
}

/* --- Tombol Salin --- */
.btn-copy {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}
.btn-copy:hover { background-color: #4338ca; }
.btn-copy:active { transform: scale(0.95); }
.btn-copy.copied { background-color: #10b981; }

/* --- Footer Guide --- */
.footer-guide {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.75rem;
    color: #64748b;
}
.footer-guide a {
    text-decoration: none;
    font-weight: bold;
}
.guide-list {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}
.code-highlight {
    font-family: monospace;
    color: #4f46e5;
    font-weight: bold;
}
