/* style.css - Versi Lengkap dengan Marquee Footer */
* {
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 80px; /* Space untuk footer marquee */
    margin: 0;
}

/* Main Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Main Card */
.main-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    background: white;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 20px;
}

.btn-add {
    background: white;
    color: #667eea;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Table Styles */
.table-responsive {
    border-radius: 10px;
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    padding: 12px;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
    padding: 12px;
}

/* Foto Thumbnail */
.foto-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
    background: #f8f9fa;
}

.foto-thumbnail:hover {
    transform: scale(1.1);
}

.foto-item {
    position: relative;
    display: inline-block;
    margin: 5px;
}

.btn-delete-foto {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    padding: 0;
    line-height: 1;
    border: none;
    cursor: pointer;
}

.btn-delete-foto:hover {
    background: #c82333;
}

/* Search Box */
.search-box {
    border-radius: 25px;
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.search-box:focus {
    border-color: #667eea;
    box-shadow: none;
}

.per-page-select {
    width: auto;
    display: inline-block;
    border-radius: 8px;
}

/* Pagination */
.pagination {
    justify-content: center;
    margin-top: 20px;
}

.page-link {
    color: #667eea;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* Modal Styles */
.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* Alert */
.alert-custom {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery Swiper */
.gallery-modal .modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.gallery-modal .modal-content {
    background: transparent;
    border: none;
}

.swiper-container {
    width: 100%;
    height: 80vh;
    background: rgba(0,0,0,0.9);
    border-radius: 15px;
}

.swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
}

.swiper-pagination-bullet {
    background: white;
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 10;
    font-size: 14px;
}

.close-gallery {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    z-index: 10;
    cursor: pointer;
}

.close-gallery:hover {
    background: rgba(0,0,0,0.9);
}

/* ==================== */
/* FOOTER MARQUEE STYLES */
/* ==================== */
.footer-marquee {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    border-top: 2px solid #667eea;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.marquee-content {
    display: inline-block;
    animation: marqueeScroll 30s linear infinite;
    white-space: nowrap;
    padding-right: 100%;
}

/* Hover pause */
.footer-marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Fade effects */
.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #1a1a2e, transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #1a1a2e, transparent);
}

/* Marquee Animation */
@keyframes marqueeScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Marquee Items */
.marquee-item {
    display: inline-block;
    margin: 0 15px;
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
    transition: all 0.3s;
}

.marquee-item:hover {
    background: rgba(102,126,234,0.3);
    transform: scale(1.05);
}

.marquee-item i {
    margin-right: 6px;
    font-size: 14px;
}

.marquee-item strong {
    margin-right: 5px;
    font-weight: 600;
}

.marquee-item span {
    font-weight: bold;
    color: #ffd700;
    margin-left: 5px;
}

.marquee-separator {
    color: #667eea;
    margin: 0 3px;
    font-size: 14px;
}

/* Value Update Animation */
.value-updated {
    animation: valueUpdate 0.5s ease-out;
}

@keyframes valueUpdate {
    0% {
        transform: scale(1);
        color: #ffd700;
    }
    50% {
        transform: scale(1.2);
        color: #ffaa00;
    }
    100% {
        transform: scale(1);
        color: #ffd700;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-bottom: 70px;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
    
    .foto-thumbnail {
        width: 35px;
        height: 35px;
    }
    
    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }
    
    .marquee-item {
        margin: 0 8px;
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .marquee-item i {
        font-size: 10px;
    }
    
    .marquee-separator {
        margin: 0 2px;
    }
    
    .marquee-container::before,
    .marquee-container::after {
        width: 40px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}
