body {
    margin: 0;
    font-family: Arial, sans-serif;
    padding: 0;
}

.container {
    margin: 0 auto; /* Pusat halaman */
    padding: 10px;  /* Tambah padding */
    max-width: 1200px; /* Batas lebar */
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #333;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 50px;
}

.navbar h1 {
    color: #f2f2f2;
    margin: 0;
    text-align: center;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.home-container, .main-container {
    display: none;
}

.active {
    display: block;
}

.home-container {
    text-align: center;
    padding: 20px;
}

.home-container h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.home-container p {
    font-size: 1.2em;
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #333;
    border-top: 1px solid #ccc;
    height: 60px;
}

.nav-item {
    display: flex;
    flex-direction: column; /* Mengatur ikon di atas teks */
    align-items: center;
    text-align: center;
    padding: 10px;
    flex: 1;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.nav-item i {
    font-size: 24px; /* Ukuran ikon */
    margin-bottom: 5px; /* Jarak antara ikon dan teks */
}

.scan-button {
    width: 60px; /* Lebar tombol */
    height: 60px; /* Tinggi tombol */
    border-radius: 50%; /* Membuatnya bulat */
    background: #ff5722; /* Warna latar belakang */
    position: relative; /* Untuk mengatur posisinya */
    top: -20px; /* Menonjol ke atas */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Efek bayangan */
    display: flex;
    flex-direction: column; /* Mengatur ikon di atas teks */
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.scan-button i {
    margin-bottom: 5px; /* Jarak antara ikon dan teks untuk tombol Scan */
    font-size: 24px; /* Ukuran ikon lebih besar untuk tombol Scan */
}

.nav-item:hover, .scan-button:hover {
    background: #444; /* Warna saat dihover */
}

.content {
    padding-top: 60px;
    padding-bottom: 70px;
    margin: 0 auto; /* Pusat halaman */
    max-width: 1200px; /* Batas lebar */
}

#scanner-container {
    width: 370px;
    height: 200px;
    overflow: hidden;
    border: 1px solid #ccc;
    margin: 0 auto;
    position: relative;
    transition: width 0.5s, height 0.5s;
}

#scanner-camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: black;
}

.portrait-photo {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    background: black;
    display: block;
    margin: 0 auto;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.corner {
    width: 80px;
    height: 80px;
    position: absolute;
    border: 4px solid rgba(255, 255, 255, 0.8);
}

.corner.top-left {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.corner.top-right {
    top: 10px;
    right: 10px;
    border-left: none;
    border-bottom: none;
}

.corner.bottom-left {
    bottom: 10px;
    left: 10px;
    border-right: none;
    border-top: none;
}

.corner.bottom-right {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

#overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

#barcode-result {
    font-size: 18px;
    text-align: center;
    margin-top: 10px;
    font-weight: bold;
    border: 2px solid #000;
    padding: 10px;
    display: inline-block;
}

#data-result {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    text-align: center;
    margin-top: 20px;
}

.grid-item {
    border: 1px solid #ccc;
    padding: 10px;
    background: #f9f9f9;
    width: calc(50% - 10px);
    box-sizing: border-box;
}

/* Tambahan CSS untuk tampilan tabel yang lebih elegan */
table { 
    width: 90%; 
    margin: 20px auto; 
    border-collapse: collapse; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
th, td { 
    border: 1px solid #ddd; 
    padding: 12px 15px; 
    text-align: center; 
}
th { 
    background-color: #f8f8f8; 
    color: #333; 
    font-weight: bold;
}
tr:nth-child(even) { 
    background-color: #f9f9f9; 
}
tr:hover { 
    background-color: #f1f1f1; 
}
h1, h2 { 
    text-align: center; 
    color: #333; 
}
