/* --- VARIABLE TEMA RED TOMATO --- */
:root {
    --tomato-main: #ff6347;       /* Warna Utama */
    --tomato-dark: #d63031;       /* Merah Gelap */
    --tomato-light: #ffcccb;      /* Merah Muda */
    --tomato-bg: #fff0f0;         /* Background Web */
    --green-leaf: #2ecc71;        /* Aksen Hijau Daun */
    --white: #ffffff;
    --text-dark: #2d3436;
    --text-gray: #636e72;
    --shadow: 0 10px 30px rgba(214, 48, 49, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif; /* Font modern */
    background-color: var(--tomato-bg);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* --- ORNAMEN BACKGROUND (CSS MURNI) --- */
.ornament {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    opacity: 0.6;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--tomato-light), transparent);
    top: -50px;
    left: -50px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ffeaa7, transparent); /* Sedikit kuning */
    bottom: -100px;
    right: -100px;
}

.leaf-1 {
    width: 100px;
    height: 100px;
    background: var(--green-leaf);
    border-radius: 0 50% 0 50%;
    top: 20px;
    right: 20%;
    opacity: 0.1;
    transform: rotate(45deg);
}

/* --- LAYOUT UTAMA --- */
.main-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER --- */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--tomato-light);
}

.logo-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.tomato-icon { font-size: 2.5rem; animation: bounce 2s infinite; }
h1 { color: var(--tomato-dark); font-size: 2.2rem; letter-spacing: 1px; }
.subtitle { color: var(--text-gray); font-size: 0.95rem; margin-top: 5px; }

.team-badge {
    margin-top: 15px;
    display: inline-block;
    background: var(--tomato-main);
    color: white;
    padding: 5px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* --- CONTAINER GRID --- */
.container {
    display: grid;
    grid-template-columns: 350px 1fr; /* Kiri tetap, kanan sisa */
    gap: 25px;
}

.card {
    background: var(--white);
    border-radius: 25px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.card:hover { transform: translateY(-5px); }

.card-header h2 {
    justify-content: center;
    text-align: center;
    font-size: 1.2rem;
    color: var(--tomato-dark);
    margin-bottom: 20px;
    border-bottom: 2px dashed var(--tomato-light);
    padding-bottom: 10px;
}

/* --- UPLOAD SECTION --- */
.upload-container { margin-bottom: 20px; }
input[type="file"] { display: none; }

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px dashed var(--tomato-light);
    border-radius: 15px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fffbfb;
}

.upload-label:hover {
    border-color: var(--tomato-main);
    background: #fff0f0;
}

.icon-upload { font-size: 2.5rem; margin-bottom: 10px; }
.file-info { font-size: 0.75rem; color: var(--text-gray); margin-top: 5px; }

/* --- CONTROLS --- */
.control-group { margin-bottom: 20px; }
.label-row { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.badge-value { color: var(--tomato-main); background: var(--tomato-bg); padding: 2px 8px; border-radius: 5px; }
.theory-text { font-size: 0.75rem; color: #888; display: block; margin-top: 5px; font-style: italic; }

/* Custom Slider Style */
.tomato-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #ffe0dd;
    border-radius: 10px;
    outline: none;
}
.tomato-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: var(--tomato-main);
    border: 3px solid white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.2s;
}
.tomato-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Switch Toggle */
.toggle-group { display: flex; align-items: center; gap: 10px; margin-top: 25px; }
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: var(--tomato-main); }
input:checked + .slider:before { transform: translateX(24px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }
.toggle-label { font-size: 0.9rem; font-weight: 600; }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, var(--tomato-dark), var(--tomato-main));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(255, 99, 71, 0.4);
    transition: 0.3s;
}
.btn-primary:hover { transform: scale(1.02); box-shadow: 0 8px 20px rgba(255, 99, 71, 0.6); }

/* --- PREVIEW AREA --- */
.preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.img-box { background: #f9f9f9; border-radius: 15px; padding: 15px; text-align: center; border: 1px solid #eee; position: relative; }
.box-label { font-size: 0.85rem; font-weight: bold; color: var(--text-gray); margin-bottom: 10px; text-transform: uppercase; }
.box-label.highlight { color: var(--tomato-main); }

.canvas-wrapper {
    min-height: 200px; display: flex; align-items: center; justify-content: center;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 10px 10px; /* Pola dot halus */
    border-radius: 10px; overflow: hidden; margin-bottom: 10px;
}

img { max-width: 100%; max-height: 300px; display: none; box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-radius: 5px; }
.empty-state { color: #aaa; font-size: 0.9rem; }

.stats { font-size: 0.8rem; color: var(--text-dark); background: white; padding: 5px 10px; border-radius: 20px; display: inline-block; border: 1px solid #eee; }
.savings-badge { position: absolute; top: 10px; right: 10px; background: var(--green-leaf); color: white; padding: 3px 10px; border-radius: 10px; font-size: 0.7rem; font-weight: bold; }

.btn-download {
    display: block; width: 100%; text-align: center; background: var(--text-dark); color: white;
    padding: 12px; border-radius: 12px; text-decoration: none; margin-top: 20px; font-weight: 600; transition: 0.3s;
}
.btn-download:hover { background: #000; }
.btn-download.disabled { background: #ccc; pointer-events: none; }

footer { text-align: center; margin-top: 30px; font-size: 0.8rem; color: var(--text-gray); }

/* Animasi */
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* Responsiveness */
@media (max-width: 800px) {
    .container { grid-template-columns: 1fr; }
    .preview-grid { grid-template-columns: 1fr; }
}