:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --badge-bg: rgba(16, 185, 129, 0.15);
    --badge-text: #34d399;
    --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --shadow-card: 0 12px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(59, 130, 246, 0.06) 0%, transparent 40%);
    background-attachment: fixed;
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.glass-card {
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-lg);
}

/* App Header */
.app-header {
    padding: 1.5rem 2rem 0;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    color: var(--primary);
}

.brand h1 {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

/* App Main */
.app-main {
    flex: 1;
    max-width: 1280px;
    width: 100%;
    margin: 1.5rem auto;
    padding: 0 2rem 2rem;
}

.table-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    min-height: 250px;
}

.releases-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.releases-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.releases-table td {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.releases-table tr:last-child td {
    border-bottom: none;
}

.releases-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.actions-col {
    text-align: right;
}

.mono-hash {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-mandatory {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-optional {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(156, 163, 175, 0.2);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.2s ease;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 16px var(--primary-glow);
}

.primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 24px var(--primary-glow);
    transform: translateY(-1px);
}

.ghost-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.icon-btn {
    padding: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.action-btn {
    padding: 0.4rem;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-color);
}

.action-btn.delete-btn:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Modals and Overlays */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.login-card {
    width: 100%;
    max-width: 380px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.logo-badge {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.glow-orb {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.3;
    pointer-events: none;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.upload-card {
    width: 100%;
    max-width: 520px;
    padding: 2rem;
    position: relative;
}

.upload-card h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-main);
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: left;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.875rem;
    outline: none;
    transition: border 0.2s ease;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.875rem;
    color: var(--text-main);
    cursor: pointer;
}

.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-muted);
    transition: all 0.2s ease;
    margin-bottom: 1.25rem;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    color: var(--text-main);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Empty & Loading states */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--text-muted);
    gap: 1rem;
}

.loading-state {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

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

/* Alerts & Toasts */
.error-text {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
    font-size: 0.875rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 200;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    border-color: var(--danger);
    color: #fca5a5;
}

.hidden {
    display: none !important;
}
