/* Reset dasar */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    color: #333;
    text-align: center;
    padding: 20px;
}

h2 {
    margin-bottom: 20px;
    color: #1f2937;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

#tanggal {
    font-weight: 600;
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 15px;
}

#jadwal {
    font-size: 15px;
    line-height: 1.8;
}

.staff-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #f9fafb;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Foto wrapper untuk efek hover dan klik */
.foto-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.staff-foto {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.foto-wrapper:hover .staff-foto {
    transform: scale(1.1);
}

/* Overlay saat hover foto */
.foto-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.foto-wrapper:hover .foto-overlay {
    opacity: 1;
}

.foto-overlay span {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.staff-info {
    flex: 1;
}

.staff-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #1f2937;
}

/* Shift info dengan badge dan jam */
.shift-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.shift-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    color: white;
}

/* Warna badge per shift */
.shift-badge.pagi {
    background: #f59e0b; /* orange */
}

.shift-badge.siang {
    background: #10b981; /* hijau */
}

.shift-badge.malam {
    background: #3b82f6; /* biru */
}

.shift-badge.libur {
    background: #9ca3af; /* abu-abu */
}

.shift-hours {
    font-size: 13px;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.btn {
    display: inline-block;
    background: #25D366;
    padding: 8px 14px;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background: #1ebc57;
    transform: scale(1.05);
}

/* Popup foto (style Instagram) */
.photo-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}

.popup-caption {
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.close-popup {
    position: absolute;
    top: -40px;
    right: -40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.3s;
}

.close-popup:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsif untuk mobile */
@media(max-width: 600px) {
    .card {
        padding: 20px;
    }
    
    .staff-card {
        flex-direction: column;
        text-align: center;
    }
    
    .staff-info {
        text-align: center;
    }
    
    .shift-info {
        justify-content: center;
    }
    
    .foto-wrapper {
        width: 100px;
        height: 100px;
    }
    
    .close-popup {
        top: -50px;
        right: 0;
    }
    
    .popup-caption {
        bottom: -40px;
    }
}


/* Header dengan tanggal dan jam */
.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

#tanggal {
    font-weight: 600;
    font-size: 16px;
    color: #4b5563;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Jam Live - Sejajar kanan dengan style sama */
#live-clock {
    font-size: 16px;
    font-weight: 600;
    color: #4b5563;
    background: #f3f4f6;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border: 1px solid #e5e7eb;
    display: inline-block;
    margin: 0;
}

#live-clock span {
    font-size: 14px;
    color: #9ca3af;
    margin-left: 4px;
    font-weight: 400;
}

/* Judul Jadwal Hari Ini */
.card h3 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

/* Konten jadwal */
#jadwal {
    font-size: 15px;
    line-height: 1.8;
}

#jadwal > div {
    padding: 6px 0;
    border-bottom: 1px dashed #f0f0f0;
}

#jadwal > div:last-child {
    border-bottom: none;
}