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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.nav-links {
    float: right;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
}

.nav-links a:hover {
    opacity: 0.8;
}

/* User Menu Dropdown */
.user-menu {
    display: inline-block;
    position: relative;
    margin-left: 2rem;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-menu-toggle:hover {
    opacity: 0.8;
}

.user-menu-toggle i {
    font-size: 1.2rem;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    z-index: 1000;
    padding-top: 0.5rem;
}

.user-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    right: 0;
    left: 0;
    height: 0.5rem;
}

.user-menu-dropdown::after {
    content: '';
    position: absolute;
    top: 0.5rem;
    right: 20px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    z-index: -1;
}

.user-menu:hover .user-menu-dropdown {
    display: block;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s;
    margin: 0;
}

.user-menu-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-menu-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

.user-menu-dropdown a:hover {
    background-color: #f4f4f4;
    opacity: 1;
}

.user-menu-dropdown a i {
    width: 16px;
    text-align: center;
}

.app-version-float {
    position: fixed;
    bottom: 10px;
    right: 10px;
    color: rgba(0, 0, 0, 0.3);
    font-size: 0.7rem;
    font-style: italic;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 3px;
    z-index: 1000;
    user-select: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #333;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    max-width: 350px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success {
    background: #27ae60;
}

.toast.error {
    background: #e74c3c;
}

.toast.info {
    background: #3498db;
}

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

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

h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.artifact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.artifact-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.artifact-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.package-name {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.version {
    margin-bottom: 1rem;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    min-width: 40px;
}

.btn i {
    font-size: 1rem;
}

.btn i + span,
.btn i:not(:only-child) {
    margin-left: 0.5rem;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
    cursor: default;
    pointer-events: none;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    min-width: 32px;
}

.btn-sm i {
    font-size: 0.85rem;
}

.empty-message {
    text-align: center;
    color: #7f8c8d;
    padding: 2rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table th,
table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

table th {
    background-color: #34495e;
    color: white;
}

.current-version {
    background-color: #e8f4f8;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    background-color: #f39c12;
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
}

.badge i {
    font-size: 0.7rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.api-info {
    margin-top: 3rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-info h3 {
    margin-bottom: 1rem;
}

.api-info code {
    background-color: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.api-info pre {
    background-color: #f4f4f4;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-top: 0.5rem;
}

.artifact-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.artifact-actions {
    display: flex;
    gap: 0.5rem;
}

.page-header {
    margin-bottom: 2rem;
}

.search-container {
    margin-top: 1.5rem;
    position: relative;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-status {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    min-height: 1.2rem;
}

.search-status.loading {
    color: #3498db;
}

.search-status.success {
    color: #27ae60;
}

.search-status.error {
    color: #e74c3c;
}

.settings-container {
    max-width: 600px;
    margin: 0 auto;
}

.settings-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-help {
    display: block;
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.preview-url {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    font-family: monospace;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

/* Deleted Items Table */
.deleted-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.deleted-items-table thead {
    background-color: #f8f9fa;
}

.deleted-items-table th,
.deleted-items-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.deleted-items-table th {
    font-weight: 600;
    color: #495057;
}

.deleted-items-table tbody tr:hover {
    background-color: #f8f9fa;
}

.deleted-items-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.deleted-items-table .btn {
    margin-left: 0.25rem;
}

/* OAuth Styles */
.btn-github {
    background-color: #24292e;
    color: white;
}

.btn-github:hover {
    background-color: #1b1f23;
    color: white;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.auth-divider span {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-provider-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}