/* General Styling */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #1a2a3a, #0d1a26); /* Gradien background gelap */
    color: #e0e0e0; /* Warna teks terang */
    display: flex;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Mencegah scroll yang tidak perlu */
}

/* Container utama */
.container {
    display: flex;
    width: 95%; /* Lebih lebar */
    max-width: 1600px; /* Lebih besar */
    height: 90vh; /* Tinggi menyesuaikan viewport */
    background-color: rgba(255, 255, 255, 0.05); /* Transparan dengan sedikit putih */
    backdrop-filter: blur(10px); /* Efek blur kaca */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); /* Shadow lebih gelap dan dalam */
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Border tipis transparan */
}

/* Sidebar Styling */
.sidebar {
    width: 320px; /* Lebar sidebar */
    background: linear-gradient(180deg, #1f3045, #122030); /* Gradien sidebar */
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto; /* Scroll jika konten banyak */
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #007bff; /* Garis bawah biru */
    padding-bottom: 15px;
}

.sidebar-logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
    border-radius: 10px;
    background-color: #007bff; /* Warna placeholder logo */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8em;
    font-weight: 700;
    color: white;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5); /* Shadow biru untuk logo */
}
.sidebar-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sidebar-header h3 {
    margin: 0;
    color: #007bff; /* Warna biru cerah */
    font-size: 1.8em;
    font-weight: 600;
}

.asset-list {
    flex-grow: 1;
    padding-right: 10px;
}

.asset-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
    padding: 12px;
    background-color: rgba(0, 0, 0, 0.2); /* Sedikit gelap transparan */
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.asset-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.asset-thumbnail {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.asset-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.asset-info p {
    margin: 0;
    font-size: 0.9em;
    word-break: break-word;
    line-height: 1.4;
}

.asset-name {
    font-weight: 500;
    color: #f0f0f0;
    margin-bottom: 5px;
}

.asset-url-text {
    font-size: 0.8em;
    color: #a0a0a0;
}

.asset-actions {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Jarak antar tombol */
    align-items: flex-end;
}

.copy-asset-btn, .delete-asset-btn {
    background-color: #28a745; /* Hijau */
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 90px;
    text-align: center;
}

.delete-asset-btn {
    background-color: #dc3545; /* Merah */
}

.copy-asset-btn:hover, .delete-asset-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.loading-message, .no-assets-message {
    text-align: center;
    color: #a0a0a0;
    font-style: italic;
    padding: 30px;
    font-size: 1.1em;
}

.sidebar-logout-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: 100%;
    margin-top: 30px;
    box-shadow: 0 5px 20px rgba(220, 53, 69, 0.3);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-logout-btn:hover {
    background-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 7px 25px rgba(220, 53, 69, 0.4);
}


/* Main Content Styling */
.main-content {
    flex-grow: 1;
    padding: 30px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.upload-section {
    width: 100%;
    max-width: 650px; /* Lebih lebar */
    background-color: rgba(255, 255, 255, 0.08); /* Latar lebih transparan */
    backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.upload-section h2 {
    margin-top: 0;
    color: #007bff;
    font-size: 2.5em; /* Lebih besar */
    margin-bottom: 25px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 123, 255, 0.5); /* Efek cahaya pada judul */
}

.upload-section p {
    color: #c0c0c0;
    font-size: 1.1em;
    margin-bottom: 30px;
}

input[type="file"] {
    display: block;
    width: calc(100% - 40px); /* Sesuaikan padding */
    margin: 20px auto;
    padding: 20px;
    border: 3px dashed #007bff; /* Border dashed biru */
    border-radius: 12px;
    background-color: rgba(0, 123, 255, 0.1); /* Latar transparan biru */
    cursor: pointer;
    font-size: 1.2em;
    color: #007bff;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
input[type="file"]:hover {
    border-color: #0056b3;
    background-color: rgba(0, 123, 255, 0.15);
}
input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}
input[type="file"]::before {
    content: 'Pilih File';
    display: inline-block;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    outline: none;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    margin-right: 15px;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
input[type="file"]:hover::before {
    background: #0056b3;
    box-shadow: 0 7px 20px rgba(0, 123, 255, 0.5);
}


#upload-button {
    background: linear-gradient(45deg, #007bff, #00bfff); /* Gradien tombol */
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    width: 100%;
    margin-top: 25px;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}

#upload-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.6);
}

#upload-button:disabled {
    background: linear-gradient(45deg, #6c757d, #adb5bd);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

#status-message {
    margin-top: 25px;
    font-size: 1.1em;
    font-weight: 500;
    color: #e0e0e0;
}

#status-message[style*="color: red"] {
    color: #ff6b6b !important; /* Merah untuk error */
}
#status-message[style*="color: green"] {
    color: #6bff6b !important; /* Hijau untuk sukses */
}


.hidden {
    display: none;
}

#result-container {
    margin-top: 30px;
    text-align: left;
    background-color: rgba(40, 167, 69, 0.2); /* Latar hijau transparan */
    border: 1px solid rgba(40, 167, 69, 0.5);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: 0 5px 20px rgba(40, 167, 69, 0.2);
}

#result-container p {
    margin: 0;
    font-weight: 500;
    flex-basis: 100%;
    margin-bottom: 10px;
    color: #d0ffd0;
    font-size: 1em;
}

#result-link {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px 0 0 8px;
    font-size: 0.95em;
    background-color: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    box-shadow: inset 0 1px 5px rgba(0,0,0,0.2);
}

#copy-button {
    width: auto;
    padding: 12px 20px;
    border: none;
    background: linear-gradient(45deg, #28a745, #22bb44); /* Gradien hijau */
    color: white;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
    margin-left: -1px;
    font-size: 0.95em;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    transition: all 0.2s ease;
}
#copy-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 20px rgba(40, 167, 69, 0.4);
}


/* Responsiveness */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
        height: auto;
        border-radius: 0;
        box-shadow: none;
        width: 100%;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 20px;
        max-height: 50vh; /* Agar sidebar tidak terlalu panjang di mobile */
        border-radius: 0;
    }
    .main-content {
        padding: 30px 20px;
    }
    .upload-section {
        max-width: 100%;
        padding: 30px;
    }
    .sidebar-header {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .sidebar-header h3 {
        font-size: 1.5em;
    }
    .upload-section h2 {
        font-size: 2em;
    }
    .asset-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .asset-thumbnail {
        margin-bottom: 5px;
    }
    .asset-info {
        width: 100%;
    }
    .asset-actions {
        flex-direction: row; /* Tombol jadi sejajar di mobile */
        width: 100%;
        justify-content: space-around;
        gap: 10px;
        margin-top: 10px;
    }
    .copy-asset-btn, .delete-asset-btn {
        flex-grow: 1; /* Ambil ruang penuh */
        max-width: 48%; /* Bagi dua */
        width: auto;
    }
    #result-link, #copy-button {
        border-radius: 10px;
        width: 100%;
        margin-left: 0;
        margin-top: 15px;
    }
    #copy-button {
        border-radius: 10px;
    }
}

/* Styling untuk login.html */
/* Pastikan ini juga menggunakan gaya mewah yang sama */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-page .uploader-container { /* Gunakan kembali class uploader-container untuk form login */
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: 400px;
}

.login-page h2 {
    color: #007bff;
    font-size: 2.2em;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.login-page input[type="text"],
.login-page input[type="password"] {
    width: calc(100% - 20px); /* Kurangi padding */
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    font-size: 1.1em;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.login-page input[type="text"]::placeholder,
.login-page input[type="password"]::placeholder {
    color: #a0a0a0;
}
.login-page input[type="text"]:focus,
.login-page input[type="password"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
}

.login-page #login-button {
    background: linear-gradient(45deg, #007bff, #00bfff);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: 600;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
    transition: all 0.3s ease;
}
.login-page #login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.6);
}
.login-page #login-button:disabled {
    background: linear-gradient(45deg, #6c757d, #adb5bd);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.login-page #login-status {
    margin-top: 20px;
    font-size: 1em;
    font-weight: 500;
    color: #e0e0e0;
}
.login-page #login-status[style*="color: red"] {
    color: #ff6b6b !important;
}
.login-page #login-status[style*="color: blue"] {
    color: #6caddf !important;
}
.sidebar-purge-btn {
    background-color: #ffc107; /* Warna kuning peringatan */
    color: #333; /* Teks gelap agar kontras */
    border: none;
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    width: 100%;
    margin-top: 15px; /* Jarak dari daftar aset */
    box-shadow: 0 5px 20px rgba(255, 193, 7, 0.3);
    transition: all 0.2s ease;
}

.sidebar-purge-btn:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 7px 25px rgba(255, 193, 7, 0.4);
}

.sidebar-purge-btn:disabled {
    background-color: #c0c0c0;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Beri jarak antara tombol purge dan logout */
.sidebar-logout-btn {
    margin-top: 15px;
}