/* ============================================================
   FITZONE GYM — Custom CSS
   Design System: Dark + Volt (#D4F900)
   ============================================================ */

/* ---- Color Variables ---- */
:root {
    --volt: #D4F900;
    --volt-rgb: 212, 249, 0;
    --bg: #0D0D0D;
    --surface: #1A1A1A;
    --border: #2a2a2a;
    --text: #FFFFFF;
    --muted: #888888;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
}

/* ---- Animations ---- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes barFill {
    from { width: 0; }
    to   { width: var(--w, 0%); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--volt-rgb), 0.4); }
    50%      { box-shadow: 0 0 20px 4px rgba(var(--volt-rgb), 0.2); }
}

@keyframes slideOut {
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes scaleBtn {
    0%   { transform: scale(1); }
    30%  { transform: scale(0.85); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

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

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(var(--volt-rgb), 0.3); }
    50%      { box-shadow: 0 0 20px rgba(var(--volt-rgb), 0.5); }
}

/* ---- Animate Utility ---- */
.animate-fadeUp {
    animation: fadeUp 0.4s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
}

/* ---- Stagger Delays ---- */
.d1  { animation-delay: 0.05s; }
.d2  { animation-delay: 0.10s; }
.d3  { animation-delay: 0.15s; }
.d4  { animation-delay: 0.20s; }
.d5  { animation-delay: 0.25s; }
.d6  { animation-delay: 0.30s; }
.d7  { animation-delay: 0.35s; }
.d8  { animation-delay: 0.40s; }
.d9  { animation-delay: 0.45s; }
.d10 { animation-delay: 0.50s; }
.d11 { animation-delay: 0.55s; }
.d12 { animation-delay: 0.60s; }

/* ---- Nav Link ---- */
.nav-link {
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 700;
    transition: color 0.2s ease;
    position: relative;
}
.nav-link:hover {
    color: var(--volt);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--volt);
    transition: width 0.2s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* ---- Kelas Card (Photo Style) ---- */
.kelas-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
    position: relative;
}
.kelas-card:hover {
    border-color: var(--volt);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(var(--volt-rgb), 0.15), 0 8px 20px rgba(0,0,0,0.3);
}

/* Card Image Container */
.kelas-card .card-img {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}
.kelas-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.kelas-card:hover .card-img img {
    transform: scale(1.08);
}
/* Gradient overlay on image bottom */
.kelas-card .card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(26,26,26,0.95) 0%, rgba(26,26,26,0) 100%);
    pointer-events: none;
}

/* Overlaid tags on image */
.kelas-card .card-img .img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem;
}
.kelas-card .card-img .img-overlay .overlay-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.kelas-card .card-img .img-overlay .overlay-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* Sport type tag on image */
.sport-tag {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Rating on image */
.img-rating {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: var(--volt);
    padding: 5px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid rgba(var(--volt-rgb), 0.2);
}

/* Card body content */
.kelas-card .card-body {
    padding: 1.25rem 1.25rem 1.5rem;
}
.kelas-card .card-body .card-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text);
    line-height: 1.3;
}
.kelas-card .card-body .card-subtitle {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.kelas-card .card-body .card-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

/* ---- Badge Intensitas ---- */
.badge-low {
    background: #0f2a1a;
    color: #6ee7b7;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-medium {
    background: #2a2d0f;
    color: #D4F900;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-high {
    background: #2a0f0f;
    color: #ff6b6b;
    padding: 2px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---- Slot Progress Bar ---- */
.slot-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 0.75rem;
}
.slot-fill {
    height: 100%;
    border-radius: 99px;
    width: 0;
    animation: barFill 1s ease forwards;
    animation-delay: inherit;
}
.slot-fill.fill-green  { background: #6ee7b7; }
.slot-fill.fill-yellow { background: #fbbf24; }
.slot-fill.fill-red    { background: #ff6b6b; }

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--volt);
    color: var(--text);
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    animation: toastIn 0.3s ease forwards;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.error {
    border-left-color: #ff6b6b;
}
.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

/* ---- Cart Floating Pill ---- */
.cart-float {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--volt);
    color: #0D0D0D;
    padding: 0.75rem 1.75rem;
    border-radius: 99px;
    font-weight: 900;
    font-size: 0.875rem;
    text-decoration: none;
    z-index: 100;
    box-shadow: 0 8px 30px rgba(var(--volt-rgb), 0.35);
    transition: all 0.2s ease;
    animation: float 3s ease-in-out infinite;
}
.cart-float:hover {
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 12px 40px rgba(var(--volt-rgb), 0.5);
}

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, #252525 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* ---- CTA Button ---- */
.btn-volt {
    background: var(--volt);
    color: #0D0D0D;
    font-weight: 900;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
}
.btn-volt:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(var(--volt-rgb), 0.35);
}
.btn-volt:active {
    transform: scale(0.97);
}
.btn-volt.pulse {
    animation: pulse 2s ease infinite;
}

/* ---- Status Badges ---- */
.badge-pending {
    background: #2a2d0f;
    color: #fbbf24;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-tervalidasi {
    background: #0f2a1a;
    color: #6ee7b7;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
}
.badge-ditolak {
    background: #2a0f0f;
    color: #ff6b6b;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ---- Flash toast auto-hide ---- */
.flash-toast {
    animation: fadeUp 0.4s ease forwards;
}

/* ---- Star Rating ---- */
.star-rating {
    display: flex;
    gap: 4px;
    cursor: pointer;
}
.star-rating .star {
    font-size: 1.5rem;
    color: var(--border);
    transition: color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}
.star-rating .star:hover,
.star-rating .star.active {
    color: var(--volt);
    transform: scale(1.15);
}

/* ---- Table Styles ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    background: var(--surface);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}
.data-table tr:hover td {
    background: rgba(var(--volt-rgb), 0.03);
}

/* ---- Form Styles ---- */
.form-input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}
.form-input:focus {
    border-color: var(--volt);
    box-shadow: 0 0 0 3px rgba(var(--volt-rgb), 0.1);
}
.form-input::placeholder {
    color: #555;
}

.form-label {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ---- Card Surface ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* ---- Stat Card ---- */
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.25s ease;
}
.stat-card:hover {
    border-color: var(--volt);
    box-shadow: 0 8px 24px rgba(var(--volt-rgb), 0.08);
}

/* ---- Row Slide Out ---- */
.row-slide-out {
    animation: slideOut 0.3s ease forwards;
}

/* ---- Empty State ---- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--muted);
    text-align: center;
}
.empty-state .emoji {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

/* ---- Upload Preview ---- */
.upload-preview {
    max-width: 300px;
    border-radius: 12px;
    border: 2px dashed var(--border);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.upload-preview:hover {
    border-color: var(--volt);
}
.upload-preview img {
    width: 100%;
    display: block;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- Print Styles ---- */
@media print {
    nav, footer, .btn-volt, .cart-float, .toast-container {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
    .data-table th, .data-table td {
        border: 1px solid #ccc;
    }
}
