:root {
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #ffedd5;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

.guestbook-container {
    width: 90%;
    max-width: 1400px;
    margin: 40px auto 80px;
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 992px) {
    .guestbook-container {
        grid-template-columns: 1fr;
    }
}

/* CARD STYLES */
.form-card, .info-card, .faq-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.info-card, .faq-card {
    background: #fafafa;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: none;
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* STATUS TABS */
.status-tabs {
    display: flex;
    background: #f3f4f6;
    padding: 6px;
    border-radius: 10px;
    margin-bottom: 30px;
    gap: 4px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 12px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-label span.required {
    color: #ef4444;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

/* BUTTONS */
.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 14px 28px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-submit:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

/* SIDEBAR RIGHT */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.1);
}

.info-text h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-dark);
}

.info-text p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

/* PURPOSE CARDS */
.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.purpose-option {
    position: relative;
}

.purpose-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.purpose-box {
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13.5px;
    font-weight: 500;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.purpose-box i {
    font-size: 20px;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.purpose-option input[type="radio"]:checked + .purpose-box {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.purpose-option input[type="radio"]:checked + .purpose-box i {
    color: var(--primary-dark);
}

.purpose-box:hover {
    background: #f9fafb;
    border-color: #cbd5e1;
}

/* ==========================================
   NEW SCANNER & OVERLAY INTERACTIVE STYLES
   ========================================== */

/* BARCODE SCANNER AREA */
.scanner-card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    border: 1px solid rgba(120, 53, 15, 0.12);
    border-radius: 20px;
    background: #faf8f5; /* Premium warm sand background */
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 10px 30px rgba(120, 53, 15, 0.03), inset 0 1px 0 #ffffff;
}

.scanner-card-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(180, 83, 9, 0.02) 0%, transparent 70%);
    pointer-events: none;
}

.scanner-card-container:hover, .scanner-card-container.active-focus {
    border-color: rgba(180, 83, 9, 0.4);
    background-color: #fcfaf6;
    box-shadow: 0 15px 40px rgba(120, 53, 15, 0.06), 0 0 25px rgba(180, 83, 9, 0.03);
}

/* Radar Pulse Animations */
.radar-pulse {
    position: absolute;
    top: 35%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 1px solid rgba(180, 83, 9, 0.12);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
}

.pulse-1 {
    animation: radarWave 4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.pulse-2 {
    animation: radarWave 4s infinite cubic-bezier(0.215, 0.61, 0.355, 1) 2s;
}

@keyframes radarWave {
    0% { transform: translate(-50%, -50%) scale(0.6); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.7); opacity: 0; }
}

/* Target Area with Corner Brackets */
.scanner-target-zone {
    position: relative;
    width: 160px;
    height: 110px;
    margin-bottom: 28px;
    z-index: 2;
}

/* Decorative Brackets */
.bracket {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: #b45309; /* Warm dark wood accent */
    border-style: solid;
    border-width: 0;
    transition: all 0.3s ease;
}

.bracket-top-left {
    top: -8px;
    left: -8px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 8px;
}

.bracket-top-right {
    top: -8px;
    right: -8px;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 8px;
}

.bracket-bottom-left {
    bottom: -8px;
    left: -8px;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 8px;
}

.bracket-bottom-right {
    bottom: -8px;
    right: -8px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 8px;
}

.scanner-card-container:hover .bracket, 
.scanner-card-container.active-focus .bracket {
    border-color: #f97316; /* Glows brighter on hover/focus */
    transform: scale(1.05);
}

/* Glowing Amber Laser Line Container */
.laser-line-container {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(120, 53, 15, 0.08);
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(120, 53, 15, 0.04);
    animation: floatingCard 4s ease-in-out infinite;
}

@keyframes floatingCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.laser-line-container i {
    font-size: 60px;
    color: #78350f; /* Dark wood color barcode */
    opacity: 0.85;
}

.laser-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: #f59e0b; /* Amber/Orange Laser matching wood theme */
    box-shadow: 0 0 12px 3px rgba(245, 158, 11, 0.7);
    top: 0;
    left: 0;
    animation: scanAnimation 2.4s infinite linear;
}

@keyframes scanAnimation {
    0% { top: 0%; }
    50% { top: 100%; }
    100% { top: 0%; }
}

.scanner-text {
    font-size: 19px;
    font-weight: 700;
    color: #78350f; /* Warm wood text dark */
    margin: 0 0 8px 0;
    text-align: center;
    z-index: 2;
}

.scanner-subtext {
    font-size: 13.5px;
    color: #a16207; /* Warm wood text muted */
    margin: 0;
    text-align: center;
    line-height: 1.6;
    max-width: 380px;
    z-index: 2;
}

/* Focus Indicator Ring */
.focus-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: 20px;
    transition: all 0.3s;
    z-index: 2;
}

.focus-indicator.connected {
    background: #fef3c7; /* Warm linen connected */
    color: #b45309;
}

.focus-indicator.connected i {
    color: #10b981;
    animation: pulseGreen 1.6s infinite ease-in-out;
}

@keyframes pulseGreen {
    0%, 100% { opacity: 0.5; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
}

.focus-indicator.disconnected {
    background: #fee2e2;
    color: #b91c1c;
    cursor: pointer;
}

/* Hidden but focused scan input */
.scanner-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: none;
    outline: none;
}

/* GLASSMORPHIC WELCOME OVERLAY MODAL */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.welcome-overlay.show {
    opacity: 1;
    visibility: visible;
}

.welcome-box {
    background: #151518;
    border: 1.5px solid #d4af37;
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.15);
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    color: #ffffff;
}

.welcome-overlay.show .welcome-box {
    transform: scale(1);
}

/* Corner Filigree Ornaments */
.corner-ornament {
    position: absolute;
    color: rgba(212, 175, 55, 0.6);
}

.ornament-top-left {
    top: 15px;
    left: 15px;
}

/* Close Button (X) */
.welcome-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(212, 175, 55, 0.7);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    z-index: 10;
}

.welcome-close-btn:hover {
    color: #fcd34d;
    transform: scale(1.1);
}

/* Crown Header */
.welcome-crown-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5px 0 15px 0;
    width: 100%;
}

.welcome-crown-line {
    height: 1px;
    flex-grow: 1;
}

.welcome-crown-line-left {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0), rgba(212, 175, 55, 0.4));
}

.welcome-crown-line-right {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.4), rgba(212, 175, 55, 0));
}

.welcome-crown {
    font-size: 32px;
    color: #d4af37;
    padding: 0 15px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    animation: crownFloat 3s ease-in-out infinite;
}

@keyframes crownFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Laurel Wreath Title Container */
.welcome-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
}

.laurel-wreath {
    width: 48px;
    height: 70px;
    flex-shrink: 0;
}

.laurel-left {
    filter: drop-shadow(-2px 2px 4px rgba(212, 175, 55, 0.2));
}

.laurel-right {
    transform: scaleX(-1);
    filter: drop-shadow(2px 2px 4px rgba(212, 175, 55, 0.2));
}

.welcome-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.5px;
}

.welcome-subtitle {
    font-size: 20px;
    font-weight: 700;
    color: #f59e0b;
    margin: 6px 0 0 0;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.welcome-desc {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.6);
    margin: 5px auto 25px auto;
    max-width: 320px;
    line-height: 1.5;
}

/* Dark Detail Info Card */
.welcome-info-card {
    background: #1e1e24;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 25px;
}

.info-row {
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
}

.info-label {
    width: 140px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label i {
    color: #d4af37;
    font-size: 15px;
    width: 18px;
    text-align: center;
}

.info-value {
    color: #ffffff;
    font-weight: 600;
    flex-grow: 1;
    display: flex;
    gap: 5px;
}

.info-value span {
    color: #ffffff;
}

/* Mengerti Button */
.btn-understand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fcd34d, #d97706);
    color: #171717;
    border: none;
    padding: 13px 40px;
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.25);
    outline: none;
}

.btn-understand:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    filter: brightness(1.05);
}

.btn-understand:active {
    transform: translateY(0);
}
