body {
    margin: 0;
    min-height: 100vh;
    width: auto;
    font-family: Arial;
    background-color: black;
    background-image: url("../images/background.png");
    background-size: cover;
    background-attachment: fixed;
}

.header {
    width: 100%;
    height: 100px;
    background-color: rgb(31, 31, 255);
    display: flex;
}

.left_part {
    display: flex;
    flex: 1;
    height: 100%;
    background-color: black;
    flex-direction: row;
}

.middle_part {
    display: flex;
    flex: 2;
    height: 100%;
    background-color: rgb(0, 0, 0);
    align-items: center;
    justify-content: center;
    gap: 4%;
    box-sizing: border-box;
}

.right_part {
    display: flex;
    flex: 1;
    height: 100%;
    background-color: rgb(0, 0, 0);
    align-items: center;
    gap: 10%;
}

.logo_img {
    height: 50px;
    width: auto;
}

.logo_div {
    display: flex;
    align-items: center;
    padding-left: 1.1%;
    box-sizing: border-box;
}

.logo_div a {
    display: flex;
    align-items: center;
}

/* Лінки в хедері: без підкреслення, з плавною лінією при наведенні */
.header_link {
    position: relative;
    display: inline-block;
    font-size: 30px;
    color: rgb(42, 143, 255);
    text-decoration: none;
    padding-bottom: 4px;
    transition: color 0.3s;
}

.header_link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background-color: rgb(42, 143, 255);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.header_link:hover {
    color: rgb(110, 180, 255);
}

.header_link:hover::after {
    transform: scaleX(1);
}

.search_input {
    height: 45%;
    width: 70%;
}

.theme_switch {
    width: 40px;
    height: 40px;
    margin-left: -10px;
    background-color: rgb(42, 143, 255);
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
    margin: 100px auto;
    padding: 0 40px;
}

/* Ліва сторона */
.hero-left {
    flex: 1.2;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(70px, 8vw, 130px);
    font-weight: 800;
    letter-spacing: -5px;
    line-height: 1.1;
    color: #f5f5f5;
    margin: 0;
    white-space: nowrap;
}

.hero-title span {
    background: linear-gradient(90deg, #2A8FFF, #0057FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Права сторона */
.hero-right {
    flex: 1;
    max-width: 550px;
}

.hero-right h2 {
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 750;
    line-height: 1.3;
    color: #ffffff;
    margin: 0 0 20px;
}

.hero-right p {
    font-size: 20px;
    line-height: 1.8;
    color: #a1a1aa;
    margin: 0;
}

.hero_wrap {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

.phone_img {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.phone_img img {
    display: block;
    height: 650px;
    width: auto;
    max-width: none;
}

/* Кнопки під hero, в одну лінію */
.auth-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    margin-top: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 170px;
    height: 52px;
    padding: 0 26px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn:active {
    transform: scale(0.97);
}

/* Увійти — під чорний фон */
.btn-login {
    color: #ffffff;
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
}

.btn-login:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* Зареєструватись — синя */
.btn-register {
    color: #ffffff;
    background-color: rgb(42, 143, 255);
    border: 2px solid rgb(42, 143, 255);
}

.btn-register:hover {
    background-color: rgb(20, 120, 230);
    border-color: rgb(20, 120, 230);
}

/* ---------- Секції під hero ---------- */

.block {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 40px 10px;
    text-align: center;
}

.block-title {
    margin: 0;
    font-size: clamp(32px, 4.5vw, 54px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    color: #f5f5f5;
}

.block-title span {
    background: linear-gradient(90deg, #2A8FFF, #0057FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.block-sub {
    margin: 14px 0 40px;
    font-size: 20px;
    color: #a1a1aa;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    text-align: left;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 30px;
    color: inherit;
    text-decoration: none;
    background: rgba(20, 24, 36, 0.62);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s, box-shadow 0.35s;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(42, 143, 255, 0.5);
    box-shadow: 0 30px 60px -30px rgba(42, 143, 255, 0.45);
}

.card-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
    font-size: 26px;
    background: linear-gradient(145deg, #4aa3ff, #0057ff);
    border-radius: 16px;
    box-shadow: 0 10px 24px -8px rgba(42, 143, 255, 0.7);
}

.card h3 { margin: 0; font-size: 26px; letter-spacing: -0.5px; color: #fff; }
.card p { margin: 0; font-size: 17px; line-height: 1.6; color: #a1a1aa; flex: 1; }
.card-more { margin-top: 8px; font-weight: 600; color: rgb(42, 143, 255); }
.card-more::after { content: " →"; display: inline-block; transition: transform 0.25s; }
.card:hover .card-more::after { transform: translateX(5px); }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.chip {
    padding: 12px 26px;
    font-size: 18px;
    font-weight: 600;
    color: rgb(110, 180, 255);
    text-decoration: none;
    background: rgba(42, 143, 255, 0.12);
    border: 1px solid rgba(42, 143, 255, 0.35);
    border-radius: 999px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.chip:hover { color: #fff; background: rgb(42, 143, 255); transform: translateY(-3px); }

.cta {
    max-width: 1120px;
    margin: 90px auto 80px;
    padding: 60px 24px;
    text-align: center;
    background: radial-gradient(70% 120% at 50% 0%, rgba(42, 143, 255, 0.28), rgba(20, 24, 36, 0.7));
    border: 1px solid rgba(42, 143, 255, 0.35);
    border-radius: 32px;
    box-sizing: border-box;
}

.cta h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -1.5px; color: #fff; }
.cta p { margin: 12px 0 28px; font-size: 19px; color: #a1a1aa; }
.cta-buttons { justify-content: center; flex-wrap: wrap; }

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 40px 36px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand { display: flex; align-items: center; gap: 8px; }
.footer-brand img { height: 28px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: #a1a1aa; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgb(110, 180, 255); }
.footer-copy { width: 100%; margin: 0; font-size: 14px; color: #6e6e73; text-align: center; }

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
    .phone_img {
        position: static;
        transform: none;
        display: flex;
        justify-content: center;
        padding: 0 20px 20px;
    }
    .phone_img img { height: auto; width: min(100%, 560px); }
}

@media (max-width: 900px) {
    .cards { grid-template-columns: 1fr; }
    .hero { margin: 50px auto; padding: 0 20px; }
    .block { padding: 50px 20px 10px; }
    .footer { padding: 24px 20px 32px; }
}

@media (max-width: 560px) {
    .hero-title { white-space: normal; letter-spacing: -3px; }
    .auth-buttons { flex-wrap: wrap; }
    .cta { margin: 60px 16px; }
}

/* Телефон може виходити за край блоку — без горизонтального скролу */
main { overflow-x: clip; }
