/* General Styling */
html, body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #1a2a40;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Make box-sizing global for all elements */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Fixed Visitor Counter Styling */
#fixedVisitorCounter {
    position: fixed;
    top: 15px;
    right: 15px;
    background-color: rgba(40, 58, 84, 0.9);
    color: #ffd700;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 5px;
}

#fixedVisitorCounter .fas {
    font-size: 1.1em;
}


.container {
    background-color: #283a54;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: calc(100% - 40px);
    margin: 20px auto;
    border: 1px solid #4a6381;
    flex-grow: 1;
}

h1 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.8em;
}

h2 {
    color: #a0c4ff;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #4a6381;
    padding-bottom: 5px;
    font-size: 1.4em;
}

h2 .fas {
    margin-right: 10px;
    color: #ffd700;
}

.description {
    text-align: center;
    color: #b0b0b0;
    margin-bottom: 25px;
    font-size: 0.9em;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #364f6b;
    border-radius: 8px;
    border: 1px solid #5d7a9f;
}

/* Info Section specific styling */
.info-section {
    margin-top: 40px;
}

.info-section ul {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.info-section ul li {
    background-color: #4a6381;
    margin-bottom: 10px;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 0.95em;
    color: #e0e0e0;
}

.info-section ul li strong {
    color: #ffd700;
}

/* Styling for generic links within content sections (like in info-section paragraphs) */
.info-section a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.info-section a:hover {
    color: #e0b000;
    text-decoration: underline;
}


.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e0e0e0;
}

.form-group label .fas {
    margin-right: 8px;
    color: #ffd700;
}

/* Input, Select, Textarea styling */
.form-group input[type="number"],
.form-group select,
.form-group textarea,
.feedback-section input[type="text"],
.feedback-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #778da9;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    appearance: none;
    background-color: #4a6381;
    color: #fff;
}

.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus,
.feedback-section input[type="text"]:focus,
.feedback-section textarea:focus {
    border-color: #ffd700;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.25);
}

.form-group small {
    display: block;
    color: #b0b0b0;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Error Message Styling */
.error-message {
    color: #ff6b6b;
    font-size: 0.85em;
    margin-top: 5px;
    height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.error-message.show {
    opacity: 1;
}

/* Progress Bar Styling */
.progress-bar-container {
    width: 100%;
    background-color: #5d7a9f;
    border-radius: 5px;
    height: 10px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-bar {
    height: 100%;
    background-color: #4CAF50;
    border-radius: 5px;
    width: 0%;
    transition: width 0.4s ease-out;
}


/* Skin Category Grid for Responsiveness */
.skin-category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Button Group Styling */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Styling untuk tombol utama (Hitung dan Reset) */
.main-action-button { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.main-action-button .fas {
    margin-right: 10px;
}

.main-action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.main-action-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Warna spesifik untuk tombol Hitung */
.calculate-button {
    background-color: #4CAF50; /* Green */
}
.calculate-button:hover {
    background-color: #45a049;
}

/* Warna spesifik untuk tombol Reset */
.reset-button {
    background-color: #f44336; /* Red */
}
.reset-button:hover {
    background-color: #da190b;
}


/* Styling untuk link yang bertindak sebagai tombol, e.g., "Kembali ke Kalkulator" */
.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    background-color: #ffd700;
    color: #1a2a40;
    border: 2px solid #e0b000;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    touch-action: manipulation;
}

.button:hover {
    background-color: #e0b000;
    border-color: #cc9900;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6);
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.2);
}

.button .fas {
    margin-right: 10px;
}


/* Result Section */
.result-section {
    margin-top: 30px;
    text-align: center;
    padding: 25px;
    background-color: #364f6b;
    border: 1px solid #5d7a9f;
    border-radius: 8px;
}

#resultPrice { /* STYLING HARGA ESTIMASI */
    font-size: 2.5em; /* Default/desktop size */
    font-weight: 700;
    color: #ffd700;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Animation for result price */
.fade-in-result {
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


.price-breakdown {
    text-align: left;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #4a6381;
    font-size: 0.9em;
    color: #b0b0b0;
    line-height: 1.6;
}

.price-breakdown p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
}

.price-breakdown p span:first-child {
    font-weight: 600;
    color: #e0e0e0;
}

.price-breakdown p span:last-child {
    color: #ffd700;
}


.result-section .disclaimer {
    font-size: 0.85em;
    color: #999;
    margin-top: 15px;
}

/* Footer Styling */
footer {
    text-align: center;
    padding: 20px;
    background-color: #1a2a40;
    color: #b0b0b0;
    border-top: 1px solid #4a6381;
    width: 100%;
    box-sizing: border-box;
}

footer p {
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.footer-links a {
    color: #a0c4ff;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.footer-links a:hover {
    color: #ffd700;
}

/* Feedback Section Styling */
.feedback-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #364f6b;
    border-radius: 12px;
    border: 1px solid #5d7a9f;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.feedback-section h2 {
    text-align: center;
    color: #ffd700;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 25px;
}

.feedback-section h2 .fas {
    color: #a0c4ff;
}

.feedback-section .description {
    margin-bottom: 30px;
    color: #b0b0b0;
    text-align: center;
}

/* Input field styling for feedback form */
.feedback-section input[type="text"],
.feedback-section textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #778da9;
    border-radius: 8px;
    background-color: #4a6381;
    color: #fff;
    font-size: 1em;
    box-sizing: border-box;
    margin-top: 5px;
    resize: vertical;
    min-height: 100px;
}

.feedback-section input[type="text"]:focus,
.feedback-section textarea:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.3);
    outline: none;
}

/* Send button styling */
.feedback-section .send-feedback-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    background-color: #4CAF50;
    border: none;
    color: white;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.feedback-section .send-feedback-button:hover {
    background-color: #3e8e41;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.feedback-section .send-feedback-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.feedback-section .send-feedback-button .fas {
    margin-right: 10px;
}

/* Comments Display Section Styling */
.comments-display-section {
    margin-top: 40px;
    padding: 30px;
    background-color: #364f6b;
    border-radius: 12px;
    border: 1px solid #5d7a9f;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.comments-display-section h2 {
    text-align: center;
    color: #ffd700;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 25px;
}

.comments-display-section h2 .fas {
    color: #a0c4ff;
}

.comments-display-section .description {
    margin-bottom: 30px;
    color: #b0b0b0;
    text-align: center;
    }

    .comments-list {
        margin-top: 20px;
        min-height: 100px;
    }

    .comment-item {
        background-color: #4a6381;
        padding: 15px;
        border-radius: 8px;
        margin-bottom: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .comment-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }

    .comment-username {
        font-weight: 700;
        color: #a0c4ff;
        font-size: 1.1em;
    }

    .comment-timestamp {
        font-size: 0.8em;
        color: #b0b0b0;
    }

    .comment-body {
        font-size: 0.95em;
        color: #e0e0e0;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .admin-reply {
        background-color: #364f6b;
        border-left: 4px solid #a0c4ff;
        padding: 10px 15px;
        margin-top: 15px;
        border-radius: 0 5px 5px 0;
    }

    .admin-reply p {
        margin: 0;
        color: #e0e0e0;
        font-size: 0.9em;
    }

    .admin-reply p strong {
        color: #ffd700;
    }

    .loading-comments {
        text-align: center;
        color: #a0c4ff;
        font-style: italic;
        margin-bottom: 20px;
    }

    .no-comments {
        text-align: center;
        color: #b0b0b0;
        font-style: italic;
        margin-bottom: 20px;
    }

    .refresh-comments-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 12px 20px;
        background-color: #5d7a9f;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 1em;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.3s ease, transform 0.2s ease;
        margin-top: 20px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .refresh-comments-button:hover {
        background-color: #4a6381;
        transform: translateY(-1px);
    }

    .refresh-comments-button .fas {
        margin-right: 8px;
    }

    /* Media Queries for Responsiveness */

    /* Tablets and larger phones (e.g., 600px and up) */
    @media (min-width: 600px) {
        .container {
            padding: 40px;
            width: calc(100% - 80px);
        }

        h1 {
            font-size: 2.2em;
        }

        h2 {
            font-size: 1.6em;
        }

        .skin-category-grid {
            grid-template-columns: 1fr 1fr;
        }

        .button-group {
            flex-direction: row;
        }
    }

    /* Adjustments for result price on mobile and smaller tablets */
    @media (max-width: 767px) {
        #resultPrice {
            font-size: 2em; /* Lebih kecil untuk tablet/phone */
        }
        .button {
            padding: 10px 15px !important;
            font-size: 0.9em !important;
            min-height: auto !important;
            line-height: normal !important;
        }
    }

    /* Further smaller screens (e.g., typical smartphones) */
    @media (max-width: 480px) {
        #resultPrice {
            font-size: 1.8em; /* Bahkan lebih kecil untuk smartphone */
        }
        .button {
            padding: 8px 12px !important;
            font-size: 0.8em !important;
        }
    }

    /* Desktops and larger (e.g., 768px and up) */
    @media (min-width: 768px) {
        h1 {
            font-size: 2.5em;
        }

        h2 {
            font-size: 1.8em;
        }

        .skin-category-grid {
            grid-template-columns: 1fr 1fr 1fr;
        }

        .form-group input[type="text"],
        .form-group input[type="number"],
        .form-group select,
        .form-group textarea {
            width: 100%;
        }
    }

    /* Further larger screens (e.g., 992px and up) */
    @media (min-width: 992px) {
        .skin-category-grid {
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        }
    }
    .share-button { /* Styling dasar untuk setiap tombol share */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px; /* Pastikan ini ada dan bukan default */
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    color: white; /* Pastikan ini ada */
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 120px;
}

.share-button .fab { /* Styling untuk ikon Font Awesome di dalam tombol */
    margin-right: 8px;
    font-size: 1.2em;
}

/* Warna spesifik */
.share-button.whatsapp {
    background-color: #09ad45; /* Hijau WhatsApp */
}
.share-button.facebook {
    background-color: #3407b1; /* biru facebook */
}

/* Styling Kotak Pengumuman */
.announcement-box {
    background-color: rgba(160, 196, 255, 0.15); /* Biru transparan */
    border: 1px solid #a0c4ff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 0.85em;
    line-height: 1.5;
    color: #d0d0d0;
    text-align: left;
}

.announcement-box i {
    color: #4CAF50; /* Ikon tameng warna hijau */
    font-size: 1.2em;
    margin-right: 8px;
}

.announcement-box strong {
    color: #ffd700; /* Warna emas buat highlight */
}

/* Biar rapi di HP */
@media (max-width: 600px) {
    .announcement-box {
        padding: 12px;
        font-size: 0.8em;
    }
}

/* Styling Tombol Survey di Atas */
.survey-button-top {
    display: inline-block;
    background-color: #ff9800; /* Warna orange mencolok */
    color: #1a2a40;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: background-color 0.3s, transform 0.2s;
    margin-top: 5px;
}

.survey-button-top:hover {
    background-color: #e68a00;
    transform: translateY(-2px);
}

/* Styling Banner Survey di Bawah Hasil */
.survey-banner-bottom {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #ffd700;
}

.survey-banner-bottom p {
    color: #e0e0e0;
    font-size: 0.95em;
    margin-bottom: 12px;
    font-weight: 600;
}

.survey-button-result {
    display: block;
    width: 100%;
    background-color: #ffd700;
    color: #1a2a40;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    box-sizing: border-box;
}

.survey-button-result:hover {
    background-color: #e0b000;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

