/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   PAGE BACKGROUND
========================= */

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: #eef8ff;

    background: url("images/banner.png") center center fixed no-repeat;
    background-size: cover;

    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.15);

    z-index: -1;
}

/* =========================
   LAYOUT
========================= */

.main {
    min-height: 100vh;
    padding: 20px;
}

#wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================
   HEADER
========================= */

header {
    background: rgba(18, 23, 38, 0.65);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(77, 220, 255, 0.35);
    border-radius: 12px;

    padding: 25px;
    margin-bottom: 25px;

    box-shadow:
        0 0 20px rgba(77, 220, 255, 0.15),
        0 0 30px rgba(255, 47, 146, 0.1);
}

header h1 {
    text-align: center;

    color: white;

    font-size: 2.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;

    text-shadow:
        0 0 10px rgba(77, 220, 255, 0.8),
        0 0 20px rgba(255, 47, 146, 0.5);

    margin-bottom: 20px;
}

/* =========================
   NAVIGATION
========================= */

.top-nav ul {
    list-style: none;

    display: flex;
    justify-content: center;
    gap: 12px;

    flex-wrap: wrap;
}

.top-nav a {
    display: block;

    padding: 12px 20px;

    text-decoration: none;
    color: #ffffff;

    background: rgba(18, 23, 38, 0.75);

    border: 1px solid #4ddcff;
    border-radius: 8px;

    transition: all 0.25s ease;
}

.top-nav a:hover {
    background: rgba(77, 220, 255, 0.25);

    box-shadow: 0 0 12px rgba(77, 220, 255, 0.8);

    transform: translateY(-2px);
}

.top-nav a.active {
    background: rgba(255, 47, 146, 0.85);

    border-color: #ff2f92;

    box-shadow: 0 0 15px rgba(255, 47, 146, 0.7);
}

/* =========================
   CONTENT BOXES
========================= */

.content,
p,
form,
table {
    background: rgba(18, 23, 38, 0.72);
    backdrop-filter: blur(6px);

    border-radius: 10px;
    border-left: 4px solid #4ddcff;

    padding: 20px;
    margin-bottom: 20px;
}

/* =========================
   LINKS
========================= */

a {
    color: #4ddcff;
}

a:hover {
    color: #ff2f92;
}

/* =========================
   FORMS
========================= */

label {
    display: block;
    margin-bottom: 5px;
    margin-top: 10px;
}

input,
select,
textarea {
    width: 100%;

    padding: 12px;

    margin-bottom: 12px;

    background: rgba(34, 44, 67, 0.9);
    color: white;

    border: 1px solid #5b6678;
    border-radius: 6px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;

    border-color: #4ddcff;

    box-shadow: 0 0 10px rgba(77, 220, 255, 0.6);
}

button,
input[type="submit"] {
    width: auto;

    background: #ff2f92;
    color: white;

    border: none;
    border-radius: 6px;

    padding: 12px 24px;

    cursor: pointer;

    transition: all 0.25s ease;
}

button:hover,
input[type="submit"]:hover {
    background: #ff5ea9;

    box-shadow: 0 0 15px rgba(255, 47, 146, 0.7);
}

/* =========================
   TABLES
========================= */

table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

th {
    background: rgba(77, 220, 255, 0.85);

    color: #121726;

    padding: 12px;
    text-align: left;
}

td {
    padding: 12px;

    border-bottom: 1px solid rgba(255,255,255,0.08);
}

tr:hover {
    background: rgba(77, 220, 255, 0.08);
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    header h1 {
        font-size: 1.8rem;
    }

    .top-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .top-nav a {
        width: 220px;
        text-align: center;
    }
}
/* =========================
   TEAM CARDS
========================= */

.teams {
    list-style: none;
    padding: 0;
}

.team-card {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    background: rgba(18, 23, 38, 0.75);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(77,220,255,0.3);
    border-radius: 12px;

    padding: 20px;
    margin-bottom: 15px;

    box-shadow: 0 0 15px rgba(77,220,255,0.15);
}

.team-info {
    flex: 1;
}

.team-field {
    background: rgba(34,44,67,0.8);

    border-left: 3px solid #4ddcff;
    border-radius: 6px;

    padding: 10px;
    margin-bottom: 10px;
}

.field-label {
    display: block;

    color: #4ddcff;

    font-size: 0.8rem;
    margin-bottom: 3px;
}

.team-thumbnail {
    width: 480px;
    height:270px;

    object-fit: contain;

    border-radius: 10px;

    border: 1px solid rgba(77,220,255,0.4);

    cursor: pointer;
}

.team-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================
   MODAL
========================= */

.modal {
    position: fixed;
    inset: 0;

    display: none;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;

    overflow: auto;
    padding: 56px 16px 16px;
}

.modal.show {
    display: flex;
}

.modal-dialog {
    position: relative;
    width: min(1100px, 96vw);
    margin: auto;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-image {
    display: block;
    max-width: min(960px, 96vw);
    max-height: min(85vh, 540px);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    image-rendering: auto;
}

.close-modal {
    position: fixed;
    top: 16px;
    right: 16px;

    width: 48px;
    height: 48px;

    background: rgba(18, 23, 38, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    color: white;

    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 100000;

    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 47, 146, 0.85);
    border-color: #ff2f92;
    box-shadow: 0 0 15px rgba(255, 47, 146, 0.7);
    color: white;
}
.team-info-preview {
    overflow: hidden;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;

    line-height: 1.5;
    color: #ddd;

    white-space: pre-wrap;
}

.modal-content {
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;

    text-align: center;
}

.modal-info {
    width: 100%;

    background: rgba(18, 23, 38, 0.9);
    border: 1px solid rgba(77, 220, 255, 0.3);
    border-radius: 10px;

    padding: 16px 20px;

    line-height: 1.6;
    white-space: pre-wrap;
    text-align: left;
}

.modal-info:empty {
    display: none;
}

html.modal-open,
body.modal-open {
    overflow: hidden;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;

    margin-top: 20px;
}

.pagination a {
    padding: 8px 14px;
    background: rgba(18,23,38,.8);
    border: 1px solid #4ddcff;
    border-radius: 6px;
    text-decoration: none;
    color: white;
}

.pagination a:hover {
    background: rgba(77,220,255,.2);
}
.team-info-text {
    white-space: normal;
    margin: 0;
    padding: 0;

    line-height: 1.4;
}

.button-link {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(77, 220, 255, 0.2);
    border: 1px solid #4ddcff;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    transition: all 0.25s ease;
}

.button-link:hover {
    background: rgba(77, 220, 255, 0.35);
    color: white;
}

.button-danger {
    background: #c0392b;
}

.button-danger:hover {
    background: #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

.inline-form {
    display: inline;
}

.status-message {
    background: rgba(46, 204, 113, 0.15);
    border-left-color: #2ecc71;
}

.form-hint {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: -6px;
    margin-bottom: 12px;
}

.error-message {
    background: rgba(231, 76, 60, 0.15);
    border-left: 4px solid #e74c3c;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
}