:root {
    --carousel-width: min(90vw, 800px);
    --carousel-height: min(70vh, 600px);
}

.team-content {
    max-width: var(--carousel-width);
    margin: 0 auto;
    padding: 2rem;
    padding-left: 0px;
}

.team-header {
    text-align: center;
    margin-bottom: 3rem;
}

.team-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.carousel-section {
    position: relative;
    margin: 2rem 0;
}

.carousel-container {
    position: relative;
    width: var(--carousel-width);
    min-height: var(--carousel-height);
    margin: 0 auto;
    overflow: hidden;
    background: var(--glass-bg);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(155, 89, 182, 0.2);
    box-shadow: 0 0 20px rgba(155, 89, 182, 0.1);
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.team-member {
    min-width: 100%;
    height: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.team-member img {
    width: 200px;
    height: auto;
    border-radius: 10px;
    margin: 1rem 0;
    transition: transform 0.3s ease;
}

.team-member img:hover {
    transform: scale(1.05);
}

.team-member .rank {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.luna-rank { color: #fb54fb; }
.admin-rank { color: #a80000; }
.teamleitung-rank { color: #fba800; }
.developer-rank { color: #54fbfb; }
.moderator-rank { color: #fb5454; }
.helfer-rank { color: #00a8a7; }
.builder-rank { color: #c200c2; }
.jrbuilder-rank { color: #c200c2; }

.team-member h3 {
    font-size: 1.8rem;
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.team-member p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 80%;
    margin: 1rem auto;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(155, 89, 182, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.carousel-button:hover {
    background: rgba(155, 89, 182, 0.4);
}

.prev {
    left: 1rem;
}

.next {
    right: 1rem;
}

@media (max-width: 768px) {
    .team-header h1 {
        font-size: 2rem;
    }

    .team-member img {
        width: 150px;
    }

    .team-member p {
        max-width: 95%;
        font-size: 0.9rem;
    }

    .carousel-button {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}