body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.background {
    background-image: url('imgs/background.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1;
}

/* Контент с бегущей RGB рамкой */
.content {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    border-radius: 16px;
    max-width: 600px;
    margin: 0 20px;
    background: #1E1E1E;
}

.content::before {
    content: "";
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 20px;
    background: linear-gradient(270deg, red, orange, yellow, green, cyan, blue, violet, red);
    background-size: 300% 300%;
    animation: animated-border 6s linear infinite;
    z-index: -1;
    padding: 3px;

    /* Маска, чтобы рамка была только по краям */
    -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes animated-border {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.profile img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1B93E3;
    margin-bottom: 10px;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    -webkit-background-clip: text;
    background-color: #ffffff;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-align: center;
}

.content h1 {
    font-size: 26px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #1B93E3, #1B93E3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.content p {
    text-align: left;
    margin: 15px 0;
    font-size: 20px;
    line-height: 1.3;
}

.highlight {
    color: #1B93E3;
    font-weight: bold;
}

.arrow {
    margin: 20px 0;
}

/* Доход */
.income-box {
    background: green;
    color: #ffffff;
    font-weight: bold;
    margin-top: 20px;
    text-align: center;
}
.income-box p {
    font-size: 18px;
    padding: 10px;
    text-align: center;
}

.seats {
    color: #1B93E3;
}

.profile-under {
    font-size: 4px;
    color: #6e6e6e;
    margin-top: -10px;
    text-align: center;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Кнопка */
.join-button {
    background: #1B93E3;
    background-size: 400% 400%;
    border: none;
    padding: 15px 30px;
    font-size: 20px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    color: #ffffff;
    animation: pulse-blink 2s infinite ease-in-out;
    transition: transform 0.3s;
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-decoration: none;
    box-shadow: 0 0 10px transparent;
}

@keyframes pulse-blink {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0px rgba(255, 255, 255, 0);
    }
}

@keyframes bounce {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

.join-link {
    text-decoration: none;
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.join-button:hover {
    transform: scale(1.05);
}

/* Медиа-запросы для адаптации под мобильные устройства */
@media screen and (max-height: 700px) {
    .content {
        padding: 20px 15px;
        margin: 10px;
    }

    .profile img {
        width: 80px;
        height: 80px;
    }

    .content h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .content p {
        font-size: 16px;
        margin: 10px 0;
    }

    .join-button {
        padding: 12px 25px;
        font-size: 18px;
    }
}

@media screen and (max-height: 600px) {
    .content {
        padding: 15px 10px;
    }

    .profile img {
        width: 70px;
        height: 70px;
    }

    .content h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .content p {
        font-size: 14px;
        margin: 8px 0;
    }

    .join-button {
        padding: 10px 20px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .content {
        margin: 10px;
        padding: 15px 10px;
    }

    .profile img {
        width: 70px;
        height: 70px;
    }

    .content h1 {
        font-size: 20px;
    }

    .content p {
        font-size: 14px;
    }

    .join-button {
        font-size: 16px;
        padding: 10px 20px;
    }
}

@media screen and (max-width: 320px) {
    .content {
        margin: 5px;
        padding: 10px 8px;
    }

    .profile img {
        width: 60px;
        height: 60px;
    }

    .content h1 {
        font-size: 18px;
    }

    .content p {
        font-size: 13px;
    }

    .join-button {
        font-size: 14px;
        padding: 8px 16px;
    }
}

/* Специальные настройки для iPhone SE и подобных устройств */
@media screen and (max-width: 375px) and (max-height: 667px) {
    .content {
        margin: 5px;
        padding: 8px 6px;
        max-width: 100%;
    }

    .profile img {
        width: 50px;
        height: 50px;
        margin-bottom: 5px;
    }

    .profile-name {
        font-size: 14px;
    }

    .content h1 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .content p {
        font-size: 12px;
        margin: 6px 0;
        line-height: 1.3;
    }

    .join-button {
        font-size: 13px;
        padding: 6px 12px;
        max-width: 90%;
    }

    .income-box p {
        font-size: 12px;
        padding: 6px;
    }

    /* Дополнительные настройки для текста */
    .content p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        max-height: 4.5em;
    }

    .profile-under {
        display: none;
    }

    .arrow {
        margin: 10px 0;
    }
}

/* Дополнительные настройки для очень маленьких экранов */
@media screen and (max-height: 500px) {
    .content {
        padding: 5px;
        margin: 5px;
    }

    .profile {
        margin-bottom: 10px;
    }

    .arrow {
        margin: 10px 0;
    }

    .income-box {
        margin-top: 10px;
    }

    /* Дополнительные настройки для текста */
    .content p {
        -webkit-line-clamp: 2;
        max-height: 3em;
    }

    .profile-under {
        display: none;
    }
}

/* Исправление для устройств с маленькой высотой и шириной */
@media screen and (max-width: 320px) and (max-height: 568px) {
    .content {
        margin: 2px;
        padding: 5px;
    }

    .profile img {
        width: 45px;
        height: 45px;
    }

    .content h1 {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .content p {
        font-size: 11px;
        margin: 4px 0;
        -webkit-line-clamp: 2;
        max-height: 2.5em;
    }

    .join-button {
        font-size: 12px;
        padding: 5px 10px;
    }

    /* Дополнительные настройки для текста */
    .profile-under {
        display: none;
    }

    .arrow {
        margin: 5px 0;
    }
}
