*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    background-color: #000000;
    color: #e0e0e0; 
    padding: 20px; 
    overflow-y: auto; 
}

:root {
    --card-bg: rgba(15, 15, 17, 0.7); 
    --card-border: 1px solid rgba(255, 255, 255, 0.12);
    --card-border-radius: 20px; 
    --card-box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); 
    --card-hover-box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55);
    --text-primary: #e0e0e0; 
    --text-headings: #ffffff;
    --profile-column-width: 360px; 
    --rules-card-base-width: 450px; 
    --rules-card-max-width: 600px; 
    --content-gap: 25px; 
    --profile-card-internal-gap: 20px; /* BYŁO 15px - LEKKIE ZWIĘKSZENIE ODSTĘPU MIĘDZY PROFILAMI */
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: grayscale(50%) brightness(60%);
}

.main-container {
    width: 100%;
    max-width: calc( (var(--profile-column-width) * 2) + var(--rules-card-max-width) + (var(--content-gap) * 2) + 20px ); 
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    padding: 0; 
}

.content-wrapper {
    display: flex;
    flex-direction: row; 
    gap: var(--content-gap); 
    align-items: flex-start; 
    width: 100%; 
    justify-content: center;
}

/* Kolumna dla kart profilowych */
.profiles-column {
    display: flex;
    flex-direction: column;
    gap: var(--profile-card-internal-gap); 
    flex-basis: var(--profile-column-width); 
    flex-shrink: 0; 
}

/* Ogólne style dla indywidualnych kart profilowych */
.profile-card-individual {
    background-color: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-box-shadow);
    backdrop-filter: blur(12px); 
    padding: 20px 25px; /* BYŁO 15px 20px - ZWIĘKSZONY PADDING */
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Animacja wejścia dla wszystkich kart */
.profile-card-individual,
.profile-hud.rules-card {
    animation: cardFadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Opóźnienia animacji dla poszczególnych kart */
.profiles-column.left-column .owner-profile { animation-delay: 0.2s; }
.profiles-column.left-column .deputy-profile { animation-delay: 0.3s; }
.profile-hud.rules-card { animation-delay: 0.4s; }
.profiles-column.right-column .director-profile { animation-delay: 0.5s; }
.profiles-column.right-column .zandarm-profile { animation-delay: 0.6s; }


.profile-card-individual:hover,
.profile-hud.rules-card:hover {
    transform: translateY(-6px) scale(1.015); 
    box-shadow: var(--card-hover-box-shadow);
}

@keyframes cardFadeInUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.profile-avatar {
    width: 95px; /* BYŁO 80px - ZWIĘKSZONY AWATAR */
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.2); /* Grubsza ramka */
    margin-bottom: 15px; /* BYŁO 10px - ZWIĘKSZONY MARGINES */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.profile-name {
    font-size: 1.5em; /* BYŁO 1.4em - ZWIĘKSZONA CZCIONKA */
    font-weight: 600; 
    color: var(--text-headings);
    margin-bottom: 5px; /* BYŁO 4px - ZWIĘKSZONY MARGINES */
}

.profile-title {
    font-size: 0.9em; /* BYŁO 0.85em - ZWIĘKSZONA CZCIONKA */
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.85;
}

/* Karta z regulaminem */
.profile-hud.rules-card {
    background-color: var(--card-bg);
    border: var(--card-border);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-box-shadow);
    backdrop-filter: blur(12px); 
    padding: 25px 30px; /* BYŁO 20px 25px - ZWIĘKSZONY PADDING */
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    
    flex-basis: var(--rules-card-base-width); 
    max-width: var(--rules-card-max-width);  
    flex-grow: 1; 
    flex-shrink: 1; 
}

.rules-content {
    width: 100%;
    color: var(--text-primary);
}

.rules-content h2 {
    font-weight: 700;
    font-size: 1.7em; /* BYŁO 1.6em - ZWIĘKSZONY NAGŁÓWEK */
    color: var(--text-headings);
    text-align: center;
    margin-bottom: 18px; /* BYŁO 15px - ZWIĘKSZONY MARGINES */
}

.rules-content p {
    font-weight: 500; 
    margin-bottom: 10px; /* BYŁO 8px - ZWIĘKSZONY MARGINES */
    line-height: 1.55; /* Lekko zwiększona interlinia */
    font-size: 0.95em; /* BYŁO 0.9em - ZWIĘKSZONY TEKST REGULAMINU */
}

/* Responsywność */
@media (max-width: 1300px) { 
    .content-wrapper {
        flex-direction: column; 
        align-items: center; 
        max-width: var(--profile-column-width); 
    }

    .profiles-column {
        flex-basis: auto; 
        width: 100%; 
    }
    
    .profile-hud.rules-card {
        width: 100%; 
        flex-basis: auto; 
        min-width: auto; 
        max-width: 100%; 
        flex-grow: 0; 
        order: 0; 
    }
}

@media (max-width: 768px) { 
    :root { 
        --profile-column-width: 100%; 
        --rules-card-base-width: 100%;
        --rules-card-max-width: 100%;
        --content-gap: 20px; 
        --profile-card-internal-gap: 15px;
    }
    body {
        padding: 15px 10px; 
        align-items: flex-start; 
    }
    .main-container {
        max-width: 100%;
    }
    .content-wrapper {
        max-width: 98%;
        gap: 15px; 
    }
    .profiles-column {
        max-width: 100%; 
        gap: 15px; 
    }
    .profile-card-individual { padding: 18px; } /* Dostosowany padding */
    .profile-hud.rules-card { padding: 22px; max-width: 100%; }

    .profile-avatar {
        width: 85px; /* Dostosowanie do mobilnych */
        height: 85px;
        margin-bottom: 12px;
    }
    .profile-name { font-size: 1.4em; } 
    .profile-title { font-size: 0.85em; }
    .rules-content h2 { font-size: 1.5em; margin-bottom: 15px; }
    .rules-content p { font-size: 0.9em; line-height: 1.45; }
}