/* Globalt */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #7a2540; /* Ljusare vinröd bakgrund */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top border / header */
.top-border {
    background-color: #4d0821; /* Mörk vinröd */
    height: 100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    color: white;
    font-size: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.top-border h1 {
    margin: 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Top links / knappar */
.top-links {
    display: flex;
    gap: 20px;              /* alltid samma avstånd mellan knappar */
    flex-wrap: wrap;         /* knappar bryts till ny rad på små skärmar */
    justify-content: center; /* centrera alltid knapparna */
    align-items: center;
    margin: 0;               /* ta bort extra margin */
    padding: 0;              /* ta bort extra padding */
}

.top-links a {
    display: inline-block;
    padding: 10px 20px;                 /* samma padding på alla sidor */
    font-size: 16px;                   /* samma fontstorlek */
    font-weight: bold;                 /* samma vikt */
    text-decoration: none;
    color: #4d0821;                   /* vinröd text */
    background-color: white;          /* vit bakgrund */
    border-radius: 15px;              /* rundade hörn */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.top-links a:hover {
    transform: translateY(-2px);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.5);
}

/* Content area */
.content {
    background-color: white;
    margin: 20px auto;
    padding: 50px;
    width: 100%;
    max-width: 1200px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    align-items: flex-start;
}

/* Assignment blocks */
.assignment-block {
    width: 750px;
    min-height: 840px;
    background-color: white;
    border: 5px solid #4d0821; /* Vinröd kant */
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 20px;
    font-size: 20px;
    color: #4d0821; /* Vinröd text */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow: auto;
}

/* Preformatted code */
pre {
    font-size: 14px;
    font-family: monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Footer */
.bottom-border {
    background-color: #4d0821; /* Mörk vinröd */
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 14px;
    text-align: center;
}

.bottom-border p,
.bottom-border a {
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* Responsivitet */
@media (max-width: 900px) {
    .assignment-block {
        width: 90%;
        min-height: auto;
    }

    .top-links a {
        padding: 12px 20px;
        font-size: 16px;
    }

    .content {
        padding: 30px;
    }
}

@media (max-width: 600px) {
    .top-border {
        flex-direction: column;
        gap: 10px;
        height: auto;
        padding: 10px;
    }

    .top-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .top-links a {
        padding: 10px 16px;
        font-size: 15px;
    }
}
