/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0066cc;
    --primary-hover: #0052a3;
    --bg-body: #f5f7fa;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #666666;
    --border: #ddd;
    --radius: 6px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

body {
    font-family: var(--font-sans);
    /* background: var(--bg-body); removed to allow background image visibility */
    background-color: transparent;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 50px;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('../images/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 850px;
    /* Increased further per request */
    filter: blur(5px);
    opacity: 0.12;
    transform: none;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 20px;
    color: var(--text-main);
    text-decoration: none;
}

.logo-icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.nav a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
}

.nav a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ============================================
   HERO (SIMPLIFIED)
   ============================================ */
.hero {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.hero-title {
    font-size: 32px;
    margin-bottom: 10px;
    color: #111;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 16px;
}

.hero-stats {
    display: none;
    /* Hide stats for simpler look */
}

/* ============================================
   TOOLS SECTION
   ============================================ */
.tools-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    align-items: start;
}

/* Sidebar / Tool Selection */
.tool-panel,
.input-panel,
.results-panel,
.about-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
    padding: 24px;
    /* Efek bayangan tengah (Middle Shadow) */
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08),
        0 0 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover effect */
.tool-panel:hover,
.input-panel:hover,
.results-panel:hover,
.about-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12),
        0 0 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    border-color: rgba(0, 102, 204, 0.2);
}

.panel-title {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tool-buttons {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: var(--text-main);
    font-size: 14px;
    transition: background 0.2s;
}

.tool-btn:hover {
    background: #f0f0f0;
}

.tool-btn.active {
    background: #e6f0ff;
    color: var(--primary);
    border-color: #b3d9ff;
    font-weight: 600;
}

.tool-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--text-muted);
    transition: stroke 0.2s;
}

.tool-btn.active .tool-icon svg {
    stroke: var(--primary);
}

.tool-desc {
    display: none;
    /* Hide description for cleaner sidebar */
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font-sans);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.input-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.submit-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: background 0.2s;
}

.submit-btn:hover {
    background: var(--primary-hover);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Results */
.results-panel {
    margin-top: 20px;
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.results-meta {
    font-size: 13px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.results-content pre {
    background: #2b303b;
    color: #c0c5ce;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.copy-btn {
    background: #fff;
    border: 1px solid var(--border);
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.copy-btn svg {
    width: 12px;
    height: 12px;
}

/* Loading */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 14px;
    display: none;
}

.loading-indicator.active {
    display: block;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* About & Footer */
.about-section {
    margin-top: 40px;
    border-top: 1px solid var(--border);
    padding-top: 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.about-card h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.about-card p {
    font-size: 14px;
    color: var(--text-muted);
}

.about-icon {
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    justify-content: center;
}

.about-icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

.footer {
    text-align: center;
    margin-top: 50px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav {
        margin-top: 10px;
    }

    /* Mobile adjustments for background logo */
    body::before {
        background-size: 90vw;
        /* Responsive size for mobile */
        opacity: 0.08;
        /* Slightly lower opacity on small screens */
    }

    /* Better spacing on mobile */
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 26px;
    }

    .logo {
        font-size: 18px;
    }
}