:root {
    /* TEMA WARNA PROFESIONAL BARU */
    --primary: #1a365d; /* Biru Tua */
    --secondary: #2c5282; /* Biru Sedang */
    --accent: #4299e1; /* Biru Aksen Terang */
    --success: #38a169; /* Hijau untuk Tombol Download */
    --light: #f7fafc;
    --dark: #2d3748;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: var(--dark);
    position: relative;
}

/* Style untuk SiteLock Badge - SEMBUNYIKAN */
img[src*="sitelock"],
#sitelock_shield,
.sitelock-seal,
body > div:first-child:has(img[src*="sitelock"]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

.language-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.language-toggle:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.container {
    width: 100%;
    max-width: 1000px;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* PERUBAHAN: Layout tidak lagi menggunakan grid, jadi sidebar dihapus */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-content {
    background-color: white;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeIn 0.8s ease-out;
}

/* Iklan Header */
.ad-header {
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: white;
    padding: 0.8rem;
    text-align: center;
    border-radius: 10px 10px 0 0;
    position: relative;
    overflow: hidden;
}

.ad-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

.ad-header-text {
    font-size: 0.9rem;
    font-weight: 600;
}

.ad-header-cta {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid white;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.ad-header-cta:hover {
    background: white;
    color: #fc8181;
}

.ad-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Iklan Horizontal Bawah */
.ad-horizontal {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    margin: 1.5rem 0;
    animation: fadeIn 0.8s ease-out;
}

.ad-horizontal .ad-content {
    min-height: 90px;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 2px dashed #dee2e6;
}

.ad-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.ad-cta {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    text-decoration: none;
    display: inline-block;
}

.ad-cta:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* Iklan Middle */
.ad-middle {
    text-align: center;
    margin: 25px auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
}

h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.content {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    animation: slideUp 0.5s ease-out;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

input, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
}

.checkbox-group input {
    width: auto;
    margin-right: 0.5rem;
}

.overhead-details {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    width: 100%;
    margin-top: 1rem;
}

.btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* PERUBAHAN: Style untuk tombol download PDF */
.btn-download {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    width: 100%;
    margin-top: 1rem;
}

.btn-download:hover {
    background: #2f855a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.results {
    margin-top: 2rem;
    display: none;
    animation: fadeIn 0.8s ease-out;
}

.results h2 {
    margin-bottom: 1rem;
    color: var(--secondary);
    text-align: center;
}

.calculation-steps {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.step {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.step-value {
    font-size: 1.1rem;
    color: var(--accent);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.price-table th, .price-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.price-table th {
    background-color: var(--primary);
    color: white;
}

.price-table tr:last-child td {
    border-bottom: none;
}

.price-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.highlight {
    font-weight: 600;
    color: var(--secondary);
}

.raw-materials-section {
    margin-bottom: 1.5rem;
}

.raw-material-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: end;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    transition: var(--transition);
}

.raw-material-item:hover {
    background-color: #e9ecef;
}

.remove-material {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    height: fit-content;
}

.remove-material:hover {
    background: #c53030;
}

.add-material-btn {
    background: #38a169;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 0.5rem;
}

.add-material-btn:hover {
    background: #2f855a;
}

.add-material-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.material-total {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #e9ecef;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    font-size: 1.1rem;
}

.unit-conversion-info {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-style: italic;
}

/* Footer Styles */
footer {
    width: 100%;
    max-width: 1000px;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.inspirational-quotes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.quote {
    flex: 1;
    min-width: 250px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.quote:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.quote-text {
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

.quote-author {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-info {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.9;
}

.email {
    font-size: 0.9rem;
    opacity: 0.9;
}

.email a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.email a:hover {
    text-decoration: underline;
    color: var(--accent);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }
    
    .container {
        margin: 1rem;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .raw-material-item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .remove-material {
        width: 100%;
    }
    
    .language-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .inspirational-quotes {
        flex-direction: column;
    }
    
    .quote {
        min-width: 100%;
    }
    
    footer {
        padding: 1.5rem;
    }
    
    .ad-horizontal .ad-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .ad-header-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Style untuk print */
@media print {
    .language-toggle,
    .ad-header,
    .ad-horizontal,
    .ad-middle,
    .btn,
    .add-material-btn,
    .remove-material {
        display: none !important;
    }
    
    .main-content {
        box-shadow: none !important;
    }
}

/* Style khusus untuk hasil yang akan di-print */
.results-print {
    background: white;
    color: black;
    font-family: 'Arial', sans-serif;
}

.step-value, .highlight {
    color: #1a365d !important;
    font-weight: bold;
}

/* ========== COOKIE CONSENT STYLES ========== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 54, 93, 0.95);
    color: white;
    padding: 1rem;
    z-index: 9999;
    display: none;
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-text a {
    color: #4299e1;
    text-decoration: underline;
}

.cookie-text a:hover {
    color: #63b3ed;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.accept-btn {
    background: #38a169;
    color: white;
}

.accept-btn:hover {
    background: #2f855a;
}

.reject-btn {
    background: #718096;
    color: white;
}

.reject-btn:hover {
    background: #4a5568;
}

.manage-btn {
    background: transparent;
    color: #4299e1;
    border: 1px solid #4299e1;
}

.manage-btn:hover {
    background: rgba(66, 153, 225, 0.1);
}

/* Cookie Settings Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.cookie-options {
    margin-bottom: 2rem;
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cookie-option input[type="checkbox"] {
    margin-right: 1rem;
    margin-top: 0.3rem;
}

.cookie-option label {
    flex: 1;
    cursor: pointer;
}

.cookie-option label strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.cookie-option label span {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
}

.cookie-option input:disabled + label {
    opacity: 0.7;
    cursor: not-allowed;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* ========== AD CONTAINER STYLES ========== */
.ad-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    text-align: center;
    border: 2px dashed #dee2e6;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.ad-placeholder {
    text-align: center;
    color: #6c757d;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4299e1;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ad-info {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-style: italic;
    color: #6c757d;
}

/* Ad loaded state */
.ad-container.loaded {
    border: 1px solid #e9ecef;
    background: white;
    padding: 1rem;
}

/* Privacy Links */
.privacy-links {
    margin: 1rem 0;
}

.privacy-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 0.5rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.privacy-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .ad-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .privacy-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .privacy-links a {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .cookie-consent {
        padding: 0.75rem;
    }
    
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .cookie-option {
        flex-direction: column;
    }
    
    .cookie-option input[type="checkbox"] {
        margin-bottom: 0.5rem;
    }
}

/* Print - hide ads and cookie consent */
@media print {
    .cookie-consent,
    .cookie-modal,
    .ad-container {
        display: none !important;
    }
}