/* =====================================================
   ALGEMEEN – DARK THEME
===================================================== */
body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f172a;
    color: #e5e7eb;
    margin: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    width: min(1200px, 92%);
    margin: auto;
    padding: 20px 0;
}

.hidden {
    display: none !important;
}

/* =====================================================
   LOGIN
===================================================== */
#loginCard {
    max-width: 420px;
    margin: 80px auto;
    padding: 28px;
    text-align: center;
    background: linear-gradient(145deg, #111827, #1f2937);
    border-radius: 16px;
    border: 1px solid #2f3b52;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

#loginCard img {
    max-width: 100%;
    margin-bottom: 20px;
}

/* =====================================================
   KAARTEN ALGEMEEN
===================================================== */
.card,
.participant-card {
    background: linear-gradient(145deg, #111827, #1f2937);
    border: 1px solid #2f3b52;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.participant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.7);
}

/* =====================================================
   TEAM HEADER
===================================================== */
.team-header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.team-shirt {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

/* =====================================================
   TOP BAR (+ KNOP)
===================================================== */
.top-bar {
    display: flex;
    justify-content: flex-end;
    margin: 10px 0 20px 0;
}

.add-btn {
    font-size: 1rem;
}

/* =====================================================
   INPUT / SELECT
===================================================== */
input,
select {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #334155;
    background-color: #020617;
    color: #e5e7eb;
    width: 100%;
    box-sizing: border-box;
    margin: 6px 0;
}

/* =====================================================
   BUTTONS – MODERN
===================================================== */
button {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.7em 1.4em;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 14px rgba(37,99,235,0.4);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.5);
}

button.gray {
    background: linear-gradient(145deg, #4b5563, #374151);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

button.red {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    box-shadow: 0 4px 14px rgba(220,38,38,0.5);
}

/* =====================================================
   PARTICIPANTS LAYOUT
===================================================== */
#app {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.participants-column {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    padding-right: 6px;
}

/* scrollbar */
.participants-column::-webkit-scrollbar {
    width: 8px;
}

.participants-column::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* =====================================================
   PARTICIPANT CARD
===================================================== */
.participant-card {
    display: flex;
    gap: 16px;
    padding-bottom: 50px;
}

.participant-card.deleted {
    opacity: 0.55;
    filter: grayscale(0.4);
}

.participant-info {
    flex: 1;
    word-break: break-word;
}

/* =====================================================
   FOTO + VLAG
===================================================== */
.image-wrapper {
    position: relative;
    width: 120px;
    height: 160px;
    flex-shrink: 0;
}
.participant-photo {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
.image-wrapper .flag {
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 35px;
    height: auto;
    z-index: 10;
    border: 1px solid #2f3b52;
    border-radius: 4px;
}

/* =====================================================
   ACTION BUTTONS IN CARD
===================================================== */
.participant-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

/* =====================================================
   MODAL (POPUP FORM)
===================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.modal-card {
    width: min(600px, 92%);
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(145deg, #111827, #1f2937);
    border: 1px solid #2f3b52;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 25px 70px rgba(0,0,0,0.8);
    animation: modalPop 0.2s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.modal-close {
    background: transparent;
    font-size: 20px;
    box-shadow: none;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

#modalForm {
    display: grid;
    gap: 10px;
}

/* animatie */
@keyframes modalPop {
    from {
        transform: scale(0.94) translateY(10px);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* =====================================================
   ROWS
===================================================== */
.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.row > * {
    flex: 1;
}

@media (max-width: 900px) {

    .team-header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .team-shirt {
        width: 90px;
        height: 90px;
    }

}

@media (max-width: 700px) {

    .participant-card {
        flex-direction: column;
        padding-bottom: 16px;
    }

    .image-wrapper {
        width: 100%;
        max-width: 220px;
    }

    .participant-actions {
        position: static;
        margin-top: 10px;
    }

    .participants-column {
        max-height: none;
    }

}
