/* ======================= 1. GLOBAL & VARIABLES ======================= */
:root {
    /* Light Theme Colors */
    --bg-color: linear-gradient(135deg, #f0f4ff 0%, #e8f5e8 50%, #fff8e1 100%);
    --text-color: #2d3748;
    --accent-1: #ff6b9d; /* pink */
    --accent-2: #4ecdc4; /* teal */
    --accent-3: #ffe66d; /* yellow */
    --accent-4: #a8e6cf; /* mint */
    --accent-5: #ffd3a5; /* peach */
    --light-bg: rgba(255, 255, 255, 0.75); /* Ditingkatkan untuk kontras di Ligh Mode */
    --light-gray: rgba(240, 240, 240, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Shadow lebih ringan untuk Light Mode */
    --radius: 12px;
    --radius-lg: 16px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial;
    background: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    min-height: 100vh;
}

/* ======================= 2. NAVBAR & NAVIGATION ======================= */
.navbar {
    display: flex;
    flex-wrap: wrap;
    background: var(--light-bg);
    backdrop-filter: blur(10px);
    padding: 10px 15px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius) var(--radius);
    justify-content: center;
}

.navbar button {
    flex: 1;
    min-width: 100px;
    margin: 5px;
    background: transparent;
    border: none;
    color: var(--text-color);
    text-align: center;
    padding: 10px 15px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.navbar button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2), var(--accent-3));
    transition: left 0.3s ease;
    z-index: -1;
    opacity: 0.2;
}

.navbar button:hover::before {
    left: 0;
    opacity: 0.3;
}

.navbar button.active {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

/* ======================= 3. GENERAL PAGE LAYOUT & FORMS ======================= */
.page {
    display: none;
    padding: 20px;
    width: 100%;
    flex-grow: 1;
    margin: 0;
    background: transparent;
    box-sizing: border-box;
}

.page.active {
    display: flex;
    flex-direction: column;
}

.page h2 {
    color: var(--accent-1);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-color);
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
    background: white;
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-1);
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 157, 0.2);
    transform: translateY(-2px);
}

button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
    margin: 10px 5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
    transition: left 0.3s ease;
    z-index: -1;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.4);
}

button.mine {
    background: linear-gradient(135deg, var(--accent-3), var(--accent-5));
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(255, 230, 109, 0.3);
}

button#btn-verify-consensus {
    background: linear-gradient(90deg, #5cb85c, #00e5a8);
    color: white;
}

/* Output and Blocks */
.output {
    background: var(--accent-4);
    color: var(--text-color);
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    font-family: "Courier New", monospace;
    word-break: break-all;
    border: 2px solid var(--accent-2);
    box-shadow: var(--shadow);
}

.status {
    color: var(--accent-2);
    font-weight: 600;
    margin-top: 10px;
}

.blockchain-block {
    background: var(--light-bg);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: var(--radius);
    border-left: 5px solid var(--accent-1);
    box-shadow: var(--shadow);
}

.chain-block {
    background: var(--light-bg);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    flex-shrink: 0;
    width: 280px;
    min-width: 280px;
    transition: transform 0.2s ease;
}

.chain-block:hover {
    transform: translateY(-3px);
}

.chain-block.invalid {
    background: linear-gradient(135deg, #ffe6e6, #ffcccc);
    border-left: 5px solid #ff6b6b;
}

.chain-row {
    display: flex;
    overflow-x: auto;
    padding: 10px;
    background: var(--light-gray);
    gap: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

/* Wallet (Consensus Page) */
.wallets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wallet {
    background: var(--light-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid var(--accent-4);
}

.wallet h3 {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.wallet button {
    background: linear-gradient(135deg, var(--accent-3), var(--accent-5));
    color: var(--text-color);
    width: 100%;
    margin-top: 10px;
}

/* ======================= 4. HOME PAGE (HERO & FEATURES) - Disesuaikan ======================= */
/* ... Kode CSS di atasnya (Hero, datetime, h2 features) tidak diubah ... */

/* ======================= 4. HOME PAGE (HERO & FEATURES) ======================= */
#page-home {
    /* Memastikan konten home berada di tengah layar secara vertikal dan horizontal */
    padding: 20px;
    align-items: center;
    justify-content: center;
    flex-grow: 1; /* Memungkinkan halaman mengambil ruang yang tersedia */
}

.hero {
    /* Background dan Padding untuk Area Judul Utama */
    background: var(--bg-color); /* Menggunakan background gradient dari root */
    color: var(--text-color);
    padding: 70px 25px;
    text-align: center;
    border-radius: var(--radius);
    margin-bottom: 30px;
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero .hero-title-main {
    /* Style untuk "BLOCKCHAIN SIMULATOR" */
    font-size: 4.5em;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 10px;
    /* Efek Gradient Text */
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2), var(--accent-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .hero-subtitle-main {
    /* Style untuk Tagline/Sub Judul */
    font-size: 1.5em;
    font-weight: 500;
    margin-bottom: 25px;
}

#datetime {
    /* Styling Kotak Tanggal & Waktu */
    background: white;
    color: var(--text-color);
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    margin-top: 15px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.home-features {
    /* Container untuk 5 Fitur di bagian bawah */
    padding: 20px;
    margin-top: 30px;
    flex-shrink: 0;
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.home-features h2 {
    /* Style untuk Judul "Fitur Simulator Utama" */
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: var(--accent-1); /* Menggunakan accent-1 (pink) */
    font-weight: 800;
    text-shadow: 1px 1px 3px rgba(255, 107, 157, 0.2);
}

.feature-grid {
    /* Layout Grid untuk 5 Kotak Fitur */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Memaksa 5 kolom di layar besar */
@media (min-width: 1200px) {
    .feature-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.feature-item {
    /* Style Dasar untuk Setiap Kotak Fitur */
    background: var(--light-bg);
    padding: 25px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.feature-item:hover {
    /* Efek Hover untuk interaktivitas */
    transform: translateY(-7px); /* Naik sedikit */
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.3); /* Bayangan yang menonjol */
    border-color: var(--accent-2); /* Border mengikuti warna aksen teal */
    background: white;
}

.feature-item h3 {
    /* Judul Fitur (HASH, BLOCK, dll.) */
    color: var(--accent-2); /* Menggunakan accent-2 (teal) */
    font-size: 22px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.feature-item p {
    /* Deskripsi Fitur */
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
    line-height: 1.4;
}

/* ======================= RESPONSIF HOME PAGE ======================= */
@media (max-width: 768px) {
    /* Hero pada perangkat mobile */
    .hero {
        padding: 30px 15px;
        min-height: 40vh;
    }
    .hero .hero-title-main {
        font-size: 3em;
    }
    .hero .hero-subtitle-main {
        font-size: 1.2em;
    }
    
    /* Feature Grid pada perangkat mobile (tumpuk vertikal) */
    .feature-grid {
        grid-template-columns: 1fr;
    }
}
  

/* ... Kode CSS di bawahnya (Responsif) tidak diubah ... */

/* ======================= 5. ABOUT ME PAGE (PROFIL & CV) ======================= */
#page-about {
    max-width: 900px;
    margin: 20px auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}

.profile-main-container {
    max-width: 700px;
    margin: 0 auto 30px auto;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
}

.profile-label {
    text-align: left;
    color: var(--accent-1);
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent-4);
    padding-bottom: 5px;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--accent-4);
    box-shadow: 0 0 0 7px rgba(255, 107, 157, 0.1);
}

.about-container-new {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-name-aligned {
    color: var(--text-color);
    font-size: 2em;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 10px;
}

.name-description-wrapper p {
    text-align: justify;
    margin-top: 0;
    font-size: 15px;
}

/* Timeline & Experience Styling */
.section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section h3 {
    color: var(--accent-2);
    border-bottom: 2px solid var(--accent-4);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.exp-box {
    margin-bottom: 15px;
    padding: 10px 0;
    border-left: 3px solid var(--accent-5);
    padding-left: 15px;
}

.exp-box p:first-of-type {
    margin-bottom: 5px;
    font-weight: 600;
}

.exp-box ul {
    margin-top: 5px;
    margin-bottom: 0;
    padding-left: 20px;
    font-size: 0.9em;
}

/* Contact Section */
.contact-section {
    padding: 20px;
    border-radius: var(--radius);
    background: var(--light-bg);
    box-shadow: var(--shadow);
}

.contact-info-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.contact-info-box {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.contact-info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    color: var(--accent-1);
    font-size: 1.5em;
    flex-shrink: 0;
}

.contact-text h4 {
    margin: 0;
    font-size: 0.9em;
    color: var(--accent-2);
}

.contact-text p {
    margin: 0;
    font-size: 0.8em;
    word-break: break-all;
}

/* Iframe */
iframe {
    width: 100%;
    border: 0;
    border-radius: 10px;
    margin-top: 20px;
    box-shadow: var(--shadow);
}

/* ======================= 6. FOOTER ======================= */
.footer {
    background: #ff6b6b;
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-top: 5px solid var(--accent-1);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-logo {
    height: 60px;
    width: auto;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
}

.footer-bottom {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copy {
    font-size: 13px;
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.6);
}

/* ======================= 7. RESPONSIVE / MOBILE ======================= */
@media (min-width: 768px) {
    /* About Me on Desktop */
    .profile-main-container {
        text-align: left;
    }
    .about-container-new {
        flex-direction: row;
        gap: 30px;
    }
    .profile-pic {
        flex-shrink: 0;
        margin: 0;
    }
    .name-description-wrapper {
        flex-grow: 1;
        margin-top: 5px;
    }
    .profile-name-aligned {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    /* Global Adjustments */
    .page {
        padding: 15px;
    }

    /* Navbar */
    .navbar {
        flex-direction: column;
        padding: 10px;
        gap: 5px;
    }
    .navbar button {
        width: 100%;
        margin: 5px 0;
    }

    /* Hero */
    .hero {
        padding: 30px 15px;
        min-height: 40vh;
    }
    .hero .hero-title-main {
        font-size: 3em;
    }
    .hero .hero-subtitle-main {
        font-size: 1.2em;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }

    /* Wallets (Consensus) */
    .wallets {
        grid-template-columns: 1fr;
    }

    /* About Me on Mobile */
    .about-container-new {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .contact-info-container {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    .footer-logo {
        height: 50px;
    }
}