/* Import Font Modern */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a29bfe;
    --bg-gradient: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #ffffff;
    --card-hover: rgba(255, 255, 255, 0.25);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite; /* Animasi Background Bergerak */
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Container Utama dengan Efek Kaca */
.container {
    width: 100%;
    max-width: 1200px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: fadeIn 1s ease-out;
}

/* Header & Navigasi */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
}

.btn-admin {
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-admin:hover {
    background: white;
    color: #333;
    transform: translateY(-2px);
}

/* Grid Layout Project */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsif Otomatis */
    gap: 25px;
}

/* Project Card Style */
.project-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efek mantul halus */
    position: relative;
    overflow: hidden;
    animation: slideUp 0.8s ease-out forwards;
    opacity: 0; /* Mulai dari invisible untuk animasi */
}

/* Stagger Animation (Muncul bergantian) */
.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: var(--card-hover);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.project-card h3 {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #fff;
}

.project-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
    color: #e0e0e0;
}

.btn-visit {
    display: inline-block;
    padding: 10px 25px;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: 0.3s;
    width: 100%;
    text-align: center;
}

.btn-visit:hover {
    background: var(--primary-color);
    color: white;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px;
    font-style: italic;
    opacity: 0.7;
}

/* Keyframe Animations */
@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive Mobile */
@media (max-width: 600px) {
    .container { padding: 20px; }
    header { flex-direction: column; text-align: center; gap: 15px; }
    h1 { font-size: 1.5rem; }
}
/* --- TAMBAHAN UNTUK LOGIN & ADMIN --- */

/* Style Form Input */
form label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #fff;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.9); /* Putih agak transparan */
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #333;
    transition: 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.5); /* Glow effect saat diketik */
    background: #fff;
}

/* Tombol Submit Utama */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #5649c0;
    transform: translateY(-2px);
}

/* Tabel Admin */
.table-responsive {
    overflow-x: auto; /* Agar bisa digeser di HP */
    margin-top: 20px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: white;
}

table th {
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    font-weight: 600;
}

table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    vertical-align: top;
}

/* Tombol Hapus Kecil */
.btn-danger {
    background: #ff7675;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85rem;
    transition: 0.3s;
    display: inline-block;
}

.btn-danger:hover {
    background: #d63031;
}

/* Style Alert Error */
.alert {
    background: rgba(255, 118, 117, 0.8);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    text-align: center;
}

/* --- RESPONSIVE MOBILE (ADMIN) --- */
@media screen and (max-width: 768px) {
    
    /* 1. Container lebih ramping di HP */
    .container {
        padding: 20px;
        width: 95%;
    }

    /* 2. Header Admin menumpuk ke bawah */
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    header .btn-group {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    header .btn-admin {
        flex: 1;
        text-align: center;
        margin: 0 5px;
    }

    /* 3. UBAH TABEL MENJADI KARTU (CARD VIEW) */
    /* Sembunyikan Header Tabel (Judul, URL, Aksi) */
    table thead {
        display: none; 
    }

    /* Baris (TR) menjadi kotak kartu */
    table tr {
        display: block;
        background: rgba(255, 255, 255, 0.1);
        margin-bottom: 15px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.2);
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }

    /* Sel (TD) menjadi baris penuh */
    table td {
        display: block;
        text-align: right;
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        position: relative;
    }

    table td:last-child {
        border-bottom: none;
        text-align: center;
        padding-top: 15px;
    }

    /* Tambahkan Label di sebelah kiri (Opsional untuk kejelasan) */
    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.8rem;
        opacity: 0.7;
        margin-top: 2px;
    }
    
    /* Perbaikan Form */
    textarea {
        min-height: 80px;
    }
}
/* --- SEARCH BAR STYLE --- */
.search-wrapper {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    animation: fadeIn 1.2s ease-out;
}

.search-form {
    display: flex;
    width: 100%;
    max-width: 500px;
    position: relative;
    gap: 10px;
}

/* Override style input khusus untuk search agar bulat */
.search-form input {
    margin-bottom: 0; /* Hilangkan margin bawah default */
    border-radius: 50px;
    padding-left: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    width: 50px;
    border-radius: 50%; /* Tombol bulat */
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.search-btn:hover {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Tombol Reset (X) kecil */
.reset-search {
    display: inline-block;
    margin-bottom: 20px;
    color: #ff7675;
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px dashed #ff7675;
}
