:root {
    font-family: 'Inter', -apple-system, sans-serif;
    --bg-primary: #0d0f12;
    --bg-card: #14171c;
    --bg-card-hover: #1c2028;
    --border-color: #2a2e3a;
    --text-primary: #f0f3f8;
    --text-secondary: #8e9aaf;
    --accent-orange: #ff7e5e;
    --accent-blue: #00b4d8;
    --accent-green: #06ffa5;
    --accent-yellow: #ffd166;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: VAR(--bg-primary);
    color: VAR(--text-primary);
    line-height: 1.5;
}

.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 126, 94, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(0, 180, 216, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 48px;
}

.header h1 {
    font-size: 48px;
    font-weight: 700;
    background: linear-gradient(135deg, VAR(--accent-orange), #feb47b, #ff6b8b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1px;
}

.header h1 i {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: VAR(--accent-orange);
}

.header p {
    color: VAR(--text-secondary);
    margin-top: 8px;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 48px;
}

.stat-card {
    background: VAR(--bg-card);
    border: 1px solid VAR(--border-color);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: VAR(--accent-orange);
    transform: translateY(-2px);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, VAR(--accent-orange), VAR(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 12px;
    color: VAR(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
}

.stat-label i {
    margin-right: 4px;
    color: VAR(--accent-green);
}

/* Add Button */
.add-btn-container {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.add-btn {
    background: linear-gradient(135deg, VAR(--accent-orange), #ff6b8b);
    border: none;
    border-radius: 40px;
    padding: 12px 24px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.add-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

/* Search */
.search-wrapper {
    max-width: 400px;
    margin: 0 auto 40px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: VAR(--text-secondary);
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    background: VAR(--bg-card);
    border: 1px solid VAR(--border-color);
    border-radius: 40px;
    font-size: 14px;
    color: VAR(--text-primary);
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: VAR(--accent-blue);
}

/* Services Grid - Sortable */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    list-style: none;
}

/* Service Card */
.service-card {
    background: VAR(--bg-card);
    border: 1px solid VAR(--border-color);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s;
    cursor: grab;
}

.service-card:active {
    cursor: grabbing;
}

.service-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: VAR(--accent-orange);
    background: VAR(--bg-card-hover);
}

/* Pinned Card */
.service-card.pinned {
    border-left: 4px solid VAR(--accent-orange);
    background: #1a1a20;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, VAR(--accent-orange), #ff6b8b);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon i {
    font-size: 24px;
    color: white;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.edit-btn, .delete-btn, .pin-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: VAR(--text-secondary);
    transition: all 0.2s;
}

.edit-btn:hover {
    background: VAR(--accent-blue);
    color: white;
}

.delete-btn:hover {
    background: VAR(--accent-orange);
    color: white;
}

.pin-btn:hover {
    background: VAR(--accent-orange);
    color: #1a1a1a;
}

.pin-btn.pinned {
    background: VAR(--accent-yellow);
    color: #1a1a1a;
}

.service-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: VAR(--text-primary);
}

.service-url {
    font-size: 11px;
    font-family: monospace;
    color: VAR(--text-secondary);
    margin-bottom: 12px;
    word-break: break-all;
}

.service-url i {
    margin-right: 4px;
    color: VAR(--accent-blue);
}

.service-desc {
    font-size: 13px;
    color: VAR(--text-secondary);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid VAR(--border-color);
}

.service-desc i {
    margin-right: 4px;
    color: VAR(--accent-yellow);
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, VAR(--accent-orange), #ff6b8b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.service-link i {
    color: VAR(--accent-orange);
}

.service-link:hover {
    gap: 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    background: VAR(--bg-card);
    border: 1px solid VAR(--border-color);
    border-radius: 24px;
    color: VAR(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, VAR(--accent-orange), VAR(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Footer */
.footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid VAR(--border-color);
    text-align: center;
    font-size: 12px;
    color: VAR(--text-secondary);
}

.footer i {
    margin: 0 4px;
    color: VAR(--accent-orange);
}

.copyright {
    margin-top: 12px;
    padding: 8px 0;
    text-align: center;
    font-size: 11px;
    color: VAR(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-bold {
    font-weight: 700;
    color: VAR(--accent-orange);
}

.version-text {
    font-weight: 600;
    color: VAR(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: VAR(--bg-card);
    margin: 5% auto;
    max-width: 500px;
    width: 90%;
    border-radius: 24px;
    border: 1px solid VAR(--border-color);
    animation: modalFade 0.3s;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid VAR(--border-color);
}

.modal-header h2 {
    font-size: 20px;
    background: linear-gradient(135deg, VAR(--accent-orange), VAR(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.modal-header .close, .modal-header .close-edit {
    font-size: 28px;
    cursor: pointer;
    color: VAR(--text-secondary);
}

.modal-header .close:hover, .modal-header .close-edit:hover {
    color: VAR(--accent-orange);
}

.form-group {
    padding: 16px 24px;
    border-bottom: 1px solid VAR(--border-color);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: VAR(--text-secondary);
}

.form-group label i {
    margin-right: 6px;
    color: VAR(--accent-orange);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    background: VAR(--bg-primary);
    border: 1px solid VAR(--border-color);
    border-radius: 12px;
    color: VAR(--text-primary);
    font-family: inherit;
    font-size: 14px;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: VAR(--accent-orange);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: VAR(--text-secondary);
}

.form-group small a {
    color: VAR(--accent-blue);
    text-decoration: none;
}

.form-buttons {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
}

.submit-btn {
    flex: 1;
    background: linear-gradient(135deg, VAR(--accent-orange), #ff6b8b);
    border: none;
    border-radius: 40px;
    padding: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
}

.cancel-btn, .cancel-edit-btn {
    flex: 1;
    background: transparent;
    border: 1px solid VAR(--border-color);
    border-radius: 40px;
    padding: 12px;
    color: VAR(--text-secondary);
    font-weight: 600;
    cursor: pointer;
}

.cancel-btn:hover, .cancel-edit-btn:hover {
    border-color: VAR(--accent-orange);
    color: VAR(--accent-orange);
}

/* Drag Hint */
.drag-hint {
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 20px;
    font-style: italic;
}

.drag-hint i {
    margin-right: 6px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px;
    color: #8e9aaf;
}

.no-results h3 {
    font-size: 20px;
    margin-top: 16px;
    margin-bottom: 8px;
    color: #f0f3f8;
}

.no-results p {
    font-size: 14px;
    color: #8e9aaf;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .header h1 {
        font-size: 32px;
    }
}
