:root {
    --bg-dark: #090d16;
    --card-bg: #0f172a;
    --card-border: #1e293b;
    --text-primary: #f8fafc;
    --text-muted: #64748b;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-blue: #3b82f6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
}

/* ==========================================================================
   HEADER & POWER ACTION BAR
   ========================================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.power-btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-power {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    color: white;
    transition: transform 0.1s, opacity 0.2s;
}

.btn-power:active { transform: scale(0.96); }
.btn-start { background: var(--accent-green); }
.btn-restart { background: var(--accent-orange); }
.btn-stop { background: var(--accent-red); }
.btn-kill { background: #991b1b; }

/* ==========================================================================
   DASHBOARD (3 SPALTEN NEBENEINANDER & KOMPAKT)
   ========================================================================== */
.server-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
    margin-top: 1rem !important;
}

.server-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem !important;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.server-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-blue);
}

.server-title-link {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem !important;
    font-weight: 600;
}

.server-title-link:hover {
    color: var(--accent-blue);
}

.server-meta {
    font-size: 0.8rem !important;
    color: var(--text-muted);
    margin: 0.6rem 0 1rem 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.card-actions {
    display: flex;
    gap: 0.4rem !important;
}

.card-actions button, .card-actions a {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.2rem !important;
    font-size: 0.8rem !important;
}

.btn-console {
    background: #1e293b;
    color: #fff;
    text-decoration: none;
    padding: 0.45rem !important;
    border-radius: 6px;
    font-size: 0.8rem !important;
    font-weight: 600;
    display: block;
    text-align: center;
    margin-bottom: 0.4rem;
}

.btn-console:hover {
    background: #334155;
}

@media (max-width: 1200px) {
    .server-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .server-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   CONSOLE & TERMINAL
   ========================================================================== */
.console-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.terminal-card {
    background: #05080e;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.terminal-header {
    background: #0d131f;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.terminal-body {
    background: #090d16;
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
    font-size: 0.82rem;
    color: #e2e8f0;
    height: calc(100vh - 210px);
    min-height: 500px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.45;
}

.terminal-input-bar {
    display: flex;
    border-top: 1px solid var(--card-border);
    background: #0d131f;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1rem;
    color: #fff;
    font-family: monospace;
    outline: none;
}

.btn-send {
    background: var(--accent-green);
    color: #fff;
    border: none;
    padding: 0 1.5rem;
    font-weight: 600;
    cursor: pointer;
}

/* Rechter Sidebar-Bereich in console.php */
.sidebar-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
}

.info-box-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

/* Smart IP-Blur Box */
.ip-blur-container {
    position: relative;
    background: #05080e;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
}

.ip-text {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    color: #f8fafc;
    filter: blur(7px);
    transition: filter 0.3s ease;
}

.ip-blur-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 600;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.ip-blur-container.unblurred .ip-text,
.ip-blur-container:hover .ip-text {
    filter: blur(0);
}

.ip-blur-container.unblurred .ip-blur-overlay,
.ip-blur-container:hover .ip-blur-overlay {
    opacity: 0;
    pointer-events: none;
}

/* Progress Bars für CPU/RAM/Disk */
.stat-item {
    margin-bottom: 0.85rem;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.progress-bar-bg {
    background: #1e293b;
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-green);
    width: 0%;
    transition: width 0.4s ease;
}

/* ==========================================================================
   EASY CONFIG & FORMS
   ========================================================================== */
.config-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.easy-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.easy-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.easy-card .config-subtext, .config-subtext {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
}

@media (max-width: 1024px) {
    .config-container {
        grid-template-columns: 1fr;
    }
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: bold;
}

.form-control {
    padding: 0.65rem 0.8rem;
    background: #0f172a;
    border: 1px solid var(--card-border);
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
}

.form-control:focus {
    border-color: #38bdf8;
    outline: none;
}

.switch-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    cursor: pointer;
}

.switch-label-text {
    color: #fff;
    font-size: 0.9rem;
}

.switch-input { display: none; }

.switch-slider {
    width: 42px;
    height: 22px;
    background: #475569;
    border-radius: 20px;
    position: relative;
    transition: background 0.3s;
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.switch-input:checked + .switch-slider {
    background: var(--accent-green);
}

.switch-input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.btn-save {
    background: var(--accent-green);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.95rem;
    margin-top: 1rem;
}

.btn-save:hover {
    background: #059669;
}

.list-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    border: 1px solid var(--card-border);
}

.btn-remove {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: bold;
}

.add-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   PLUGINS & MODS
   ========================================================================== */
.type-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #fff;
    border-color: var(--accent-blue);
}

.tab-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: #fff;
    font-weight: bold;
}

.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: #fff;
    border-radius: 8px;
}

.btn-search {
    padding: 0.75rem 1.5rem;
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
}

.mod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.mod-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mod-card-header {
    display: flex;
    align-items: center;
}

.mod-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-right: 0.75rem;
    object-fit: cover;
}

.mod-author {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mod-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.75rem 0;
}

.btn-install {
    background: var(--accent-green);
    color: #fff;
    border: none;
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    margin-top: 1rem;
}

/* ==========================================================================
   DATEIMANAGER
   ========================================================================== */
.file-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.file-breadcrumb {
    background: var(--card-bg);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    font-family: monospace;
    color: #38bdf8;
    flex: 1;
}

.file-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-file-action {
    background: #334155;
    color: #fff;
    border: 1px solid #475569;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-file-action:hover { background: #475569; }

.file-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: visible !important;
    border: 1px solid var(--card-border);
}

.file-table th, .file-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
    color: #cbd5e1;
    overflow: visible !important;
}

.file-table th {
    background: #0f172a;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.file-table tr:hover { background: rgba(255, 255, 255, 0.03); }

.file-item {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    text-decoration: none;
}

.file-item:hover { color: #38bdf8; }

.action-dropdown {
    position: relative;
    display: inline-block;
}

.btn-dots {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.btn-dots:hover {
    background: #334155;
    color: #fff;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%; /* Klappt nach OBEN auf, damit es nie unten rausfällt */
    margin-bottom: 0.3rem;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 99999 !important; /* Liegt garantiert über allen anderen Tabellenzeilen */
    min-width: 160px;
    overflow: hidden;
    padding: 0.3rem 0;
}

.dropdown-menu.show { display: block; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    color: #1e293b;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.dropdown-item:hover { background: #f1f5f9; }
.dropdown-item.danger { color: var(--accent-red); }
.dropdown-item.danger:hover { background: #fef2f2; }

/* Modal Editor */
.editor-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.editor-content {
    background: #0f172a;
    width: 80%;
    height: 80%;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.editor-textarea {
    flex: 1;
    background: #1e293b;
    border: 1px solid var(--card-border);
    color: #e2e8f0;
    font-family: monospace;
    padding: 1rem;
    border-radius: 8px;
    resize: none;
    margin: 1rem 0;
    white-space: pre;
    font-size: 0.9rem;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

/* ==========================================================================
   ERROR PAGES (403 / 404)
   ========================================================================== */
.error-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 600px;
    margin: 3rem auto;
}

.error-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.error-title.danger { color: var(--accent-red); }
.error-title.warning { color: var(--accent-orange); }

.error-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.btn-error-home {
    display: inline-block;
    background: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-error-home:hover {
    background: #2563eb;
}

/* ==========================================================================
   STARTUP PAGE
   ========================================================================== */
.startup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 992px) {
    .startup-grid {
        grid-template-columns: 1fr;
    }
}

.startup-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.startup-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.cmd-code-box {
    background: #05080e;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #10b981;
    overflow-x: auto;
    word-break: break-all;
    white-space: pre-wrap;
}

.cmd-code-box.readonly-cmd {
    color: var(--text-muted);
    background: #0b111e;
    border-style: dashed;
}

.variable-card {
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.variable-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.variable-env {
    font-family: monospace;
    background: #1e293b;
    color: #38bdf8;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.variable-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.variable-rules {
    font-size: 0.75rem;
    color: #f59e0b;
    margin-top: 0.2rem;
}

/* ==========================================================================
   NETWORK PAGE
   ========================================================================== */
.network-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.allocation-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.allocation-card.is-primary {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.allocation-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.allocation-address {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    font-family: monospace;
}

.primary-badge {
    background: var(--accent-blue);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 0.5rem;
}

.allocation-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-input {
    background: #0b111e;
    border: 1px solid var(--card-border);
    color: #fff;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    width: 220px;
}

.btn-make-primary {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #38bdf8;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.btn-make-primary:hover {
    background: #38bdf8;
    color: #000;
}

.btn-delete-alloc {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-delete-alloc:hover {
    background: #ef4444;
    color: #fff;
}

/* ==========================================================================
   BACKUPS, USERS, DATABASES & SCHEDULES
   ========================================================================== */
.page-container {
    max-width: 1100px;
    margin: 0 auto;
}

.table-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
}

.data-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* User Permissions Modal & Grid */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.perm-card {
    background: #0f172a;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.85rem;
}

.perm-card-title {
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.perm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    color: #e2e8f0;
    cursor: pointer;
}

.perm-checkbox input[type="checkbox"] {
    accent-color: var(--accent-blue);
    width: 16px;
    height: 16px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}
.badge-green { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 1px solid #10b981; }
.badge-orange { background: rgba(245, 158, 11, 0.2); color: #f59e0b; border: 1px solid #f59e0b; }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; }

/* ==========================================================================
   PORTAL / LANDING PAGE (index.php)
   ========================================================================== */
body.login-portal-body {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    background: #090d16 !important;
    margin: 0 !important;
    padding: 1.5rem !important;
}

.portal-container {
    width: 100%;
    max-width: 850px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.portal-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.portal-header h1 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.portal-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.portal-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    width: 100%;
}

.portal-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.portal-card:hover {
    transform: translateY(-3px);
    border-color: #38bdf8;
}

.portal-card.classic:hover {
    border-color: #f59e0b;
}

.portal-badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.badge-beta {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.badge-classic {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.portal-card h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.portal-card p {
    color: #94a3b8;
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.portal-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-beta {
    background: #38bdf8;
    color: #090d16;
}

.btn-beta:hover {
    opacity: 0.9;
}

.btn-classic {
    background: #f59e0b;
    color: #090d16;
}

.btn-classic:hover {
    opacity: 0.9;
}

@media (max-width: 640px) {
    .portal-cards {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   HYTALE MOD MANAGER STYLES
   ========================================================================== */

.mod-installed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.85rem;
    margin-top: 1rem;
}

.mod-installed-card {
    background: #0f172a;
    border: 1px solid var(--card-border, #1e293b);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mod-installed-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow: hidden;
}

.mod-file-icon {
    font-size: 1.1rem;
}

.mod-file-name {
    color: #f8fafc;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-installed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    text-align: center;
    margin-top: 1rem;
}