* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #121212;
    color: #f1f1f1;
}

/* Index-sidan */

header {
    padding: 25px 20px;
    text-align: center;
    background: #1e1e1e;
    border-bottom: 1px solid #333;
}


.site-logo {
    display: block;
    max-width: 360px;
    width: min(80vw, 360px);
    height: auto;
    margin: 0 auto 10px auto;
    background: #fff;
    border-radius: 12px;
    padding: 14px 18px;
}

header h1 {
    margin: 0;
    font-size: 2.8rem;
}

header p {
    color: #bbb;
    font-size: 1.1rem;
}

main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Klickbara kort och länkar */
.card {
    position: relative;
    background: #1f1f1f;
    border: 0;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #fff;
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid #4f8cff;
    pointer-events: none;
}

.card:hover {
    background: #292929;
    transform: translateY(-3px);
}

.links a {
    background: #1f1f1f;
    border: 3px solid #4f8cff;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    font-weight: bold;
    transition: background 0.2s ease, transform 0.2s ease;
    cursor: pointer;
    box-shadow: 0 0 0 1px #4f8cff;
}

.links a:hover {
    background: #292929;
    transform: translateY(-3px);
}

.card h2 {
    margin-top: 0;
    font-size: 1.4rem;
}

.card-wide {
    grid-column: 1 / -1;
}

.card p {
    color: #bbb;
    line-height: 1.5;
}

section {
    margin-top: 50px;
}

section h2 {
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}

.links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}


footer {
    text-align: center;
    color: #777;
    padding: 30px;
    border-top: 1px solid #333;
    margin-top: 60px;
}

/* 403-sidan */

.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    max-width: 700px;
    text-align: center;
    padding: 40px;
}

.container h1 {
    font-size: 6rem;
    margin: 0;
    color: #ff5555;
}

.container h2 {
    margin-top: 10px;
    font-size: 2rem;
}

.container p {
    color: #bdbdbd;
    line-height: 1.6;
    margin-bottom: 30px;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.button {
    display: inline-block;
    padding: 12px 24px;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 8px;
    color: #f1f1f1;
    text-decoration: none;
    transition: 0.2s;
}

.button:hover {
    background: #292929;
    border-color: #666;
}

.home {
    background: #2b4c7e;
    border-color: #3f6cb1;
}

.home:hover {
    background: #365f9e;
}

/* Serverstatus */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
}

.stat-card {
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 22px;
}

.stat-card span {
    display: block;
    color: #aaa;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.stat-card strong {
    display: block;
    color: #fff;
    font-size: 1.5rem;
}

.disk-card {
    grid-column: 1 / -1;
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
}

.disk-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.disk-row {
    margin-bottom: 18px;
}

.disk-label {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #f1f1f1;
}

.disk-label span {
    color: #bbb;
}

.disk-bar {
    width: 100%;
    height: 13px;
    background: #111;
    border: 1px solid #444;
    border-radius: 999px;
    overflow: hidden;
}

.disk-fill {
    height: 100%;
    min-width: 4px;
    background: #b34b86;
}

/* Kataloglistning / file browser */

.dir-header {
    margin-bottom: 25px;
}

.dir-header p {
    color: #bbb;
    line-height: 1.5;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    color: #aaa;
    font-size: 0.95rem;
}

.breadcrumbs a {
    color: #f1f1f1;
    text-decoration: none;
    border-bottom: 1px solid #444;
}

.breadcrumbs a:hover {
    border-color: #aaa;
}

.dir-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 25px 0;
}

.dir-actions a {
    background: #222;
    border: 1px solid #333;
    color: #f1f1f1;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
}

.dir-actions a:hover {
    background: #333;
}

.dir-table-wrap {
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
}

.dir-table {
    width: 100%;
    border-collapse: collapse;
}

.dir-table th,
.dir-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #333;
    text-align: left;
}

.dir-table th {
    background: #191919;
    color: #aaa;
    font-weight: normal;
    font-size: 0.95rem;
}

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

.dir-table a {
    color: #f1f1f1;
    text-decoration: none;
    font-weight: bold;
}

.dir-table a:hover {
    text-decoration: underline;
}

.dir-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dir-icon {
    width: 1.4rem;
    display: inline-block;
    text-align: center;
}

.dir-muted {
    color: #aaa;
}

.dir-empty {
    background: #1f1f1f;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    color: #bbb;
}

@media (max-width: 700px) {
    .dir-table th:nth-child(2),
    .dir-table td:nth-child(2) {
        display: none;
    }

    .dir-table th,
    .dir-table td {
        padding: 12px 10px;
    }
}


.logo {
    max-height: 120px;
    margin-bottom: 15px;
}

header h1 {
    margin: 0 0 5px 0;
    font-size: 3rem;
}

header img {
    width: 260px !important;
    height: auto !important;
    max-width: 90% !important;
}

/* Mindre fullbrett kort under Ämnen */
.card-compact {
    padding: 18px 25px;
}

.card-compact h2 {
    margin-bottom: 8px;
}

.card-compact p {
    margin-bottom: 0;
}

/* Serverstatus: 6 kort på första raden på normal skärmbredd */
.stats-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (max-width: 1000px) {
    .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
