* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body {
    -webkit-app-region: drag;
    cursor: default;
    width: 500px;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    margin: 0;
    max-height: 600px;
    overflow-y: auto;
}
/* Custom scrollbar styling */

 ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

 ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

 ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

 ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.header h3 {
    margin: 0;
    font-size: 18px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.service-item {
    position: relative;
    text-align: center;
    padding: 15px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                order 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, order;
}

.service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-item img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.service-item p {
    margin: 0;
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}

.status-badge {
    position: relative;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    margin-top: 8px;
    font-weight: 500;
}

.status-active {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    color: white;
}

.status-inactive {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
}

.loading {
    background: linear-gradient(45deg, #f1c40f, #f39c12);
    color: white;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.footer {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    margin: 0;
    font-size: 12px;
    color: #fff;
}

.social-links a {
    color: #fff;
    margin-left: 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #666;
}

.categories-section {
    margin-bottom: 20px;
}

.search-box {
    margin-bottom: 15px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.categories-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.category-item {
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.category-item.active {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border-color: transparent;
}

.category-item img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.safety-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(45deg, #ff4757, #ff6b81);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.safety-logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.9);
    /* Background semi-transparan */
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: #ff6b6b;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.user-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
}

.service-item.full {
    opacity: 0.6;
    pointer-events: none;
}

.service-item.full::after {
    content: "Penuh";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    padding: 4px 12px;
    border-radius: 12px;
    color: white;
    font-size: 12px;
}

/* Tambahkan style untuk tooltip */
.has-tooltip {
    position: relative;
}

.has-tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.has-tooltip:hover::before {
    visibility: visible;
    opacity: 1;
}
.warning-message {
    background-color: #ffe0e0;
    border: 2px solid #ff5555;
    color: #d32f2f;
    padding: 20px;
    margin: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.warning-message h3 {
    margin: 0 0 15px 0;
    color: #d32f2f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-message ul {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.warning-message li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ffcdd2;
}

.warning-message .status {
    background-color: #ff5555;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.warning-note {
    font-size: 13px;
    color: #666;
    margin: 15px 0;
    padding: 10px;
    background-color: #fff3cd;
    border-radius: 4px;
}

.refresh-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
    margin-top: 15px;
}

.refresh-btn:hover {
    background-color: #45a049;
}

.version-warning {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-warning i {
    font-size: 18px;
    color: #856404;
}

.update-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    width: 100%;
    transition: background-color 0.2s;
}

.update-btn:hover {
    background-color: #218838;
}

.description-container {
    position: absolute;
    top: 13%;
    left: 5px;
    transform: translateY(-50%);
    z-index: 2000;
}

.info-icon {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
}

.info-icon:hover {
    color: rgba(255, 255, 255, 1);
}

.description-popup {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 12px;
    width: max-content;
    max-width: 200px;
    top: 50%;
    left: 25px;
    transform: translateY(-50%) translateX(5px);
    z-index: 2001;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.description-popup::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent rgba(0, 0, 0, 0.9) transparent transparent;
}

.description-container:hover .description-popup {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) translateX(10px);
}

.more-options {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 2000;
}

.more-options-btn {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 5px;
}

.more-options-btn:hover {
    color: rgba(255, 255, 255, 1);
}

.more-options-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 5px 0;
    min-width: 150px;
    transform: translateY(5px);
    transition: all 0.3s ease;
    z-index: 2001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.more-options.active .more-options-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.more-options-item {
    padding: 8px 15px;
    color: white;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.more-options-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.more-options-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.favorite-active {
    color: #ffd700;
}

.service-item.favorite {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

.service-item.favorite:hover {
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.15);
}

/* Animasi untuk favorite */
.favorite-animation {
    animation: favoriteScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.unfavorite-animation {
    animation: unfavoriteScale 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes favoriteScale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes unfavoriteScale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.favorite {
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 215, 0, 0.05);
}

/* Loading skeleton animation */
.service-item.loading {
    position: relative;
    overflow: hidden;
}

.service-item.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status badge dengan tooltip */
.status-badge::before {
    content: attr(data-status);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.status-badge:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Error state dengan shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.status-badge.error {
    animation: shake 0.5s ease;
}

/* Connection indicator */
.connection-status {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4CAF50;
    transition: all 0.3s ease;
}

.connection-status.offline {
    background: #f44336;
}

/* Success/Error notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.notification.error {
    background: linear-gradient(45deg, #f44336, #e53935);
}

/* Modern Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.95), rgba(30, 30, 30, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    position: relative;
    padding: 25px 30px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.05), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.modal-service-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-service-icon img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: contain;
}

.modal-title-group {
    flex: 1;
}

.modal-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(45deg, #ffffff, #e0e0e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-top: 4px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(85vh - 180px);
}

.modal-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
}

.modal-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    font-size: 14px;
}

.modal-footer {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.modal-btn.primary {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.modal-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Custom scrollbar */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

