body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    /* глибокий чорний фон */
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-transform: lowercase;
    overflow-x: hidden; /* ховаємо горизонтальну прокрутку */
    cursor: default; /* звичайний курсор */
}

/* --- Ефект магічних іскор --- */
.magic-particle {
    position: fixed;
    border-radius: 50%;
    background: #aa00ff; /* фіолетовий колір */
    box-shadow: 0 0 10px #aa00ff, 0 0 20px #ffffff; /* світіння */
    pointer-events: none; /* щоб не заважали клікати */
    z-index: 9999;
}

/* --- анімація зірок на фоні --- */
.stars, .stars2, .stars3 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: transparent;
}

.stars {
    background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png') repeat;
    background-size: 1000px 1000px;
    animation: starsMove 100s linear infinite;
}

.stars2 {
    background: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png') repeat;
    background-size: 500px 500px;
    animation: starsMove 150s linear infinite;
    opacity: 0.6;
}

@keyframes starsMove {
    from { background-position: 0 0; }
    to { background-position: 10000px 5000px; }
}

/* --- основний стиль --- */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 1;
}

.header {
    margin-top: 30px;
}

.header h1 {
    text-transform: none; 
    letter-spacing: 1px;
    text-shadow: 0 0 20px rgba(170, 0, 255, 0.8);
    margin-bottom: 5px;
}

.subtitle {
    color: #aa00ff;
    font-size: 14px;
    margin-top: 0;
    opacity: 0.8;
    letter-spacing: 1px;
    font-weight: bold;
}

.logo {
    width: 160px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(170,0,255,0.5));
}

.cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
    width: 100%;
    max-width: 1200px;
}

.card {
    width: 180px;
    height: 260px;
    background: url('images/card-logo.png') center/60px no-repeat, linear-gradient(135deg, #8b5cf6, #aa00ff);
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0 25px rgba(170, 0, 255, 0.4);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 0 50px rgba(170, 0, 255, 1);
    border-color: rgba(255,255,255,0.5);
}

/* анімація перевороту */
.card.flipping {
    animation: flipOut 0.6s forwards;
    pointer-events: none;
}

@keyframes flipOut {
    0% { transform: rotateY(0) scale(1); }
    100% { transform: rotateY(180deg) scale(0.8); opacity: 0; }
}

/* --- блок how it works з рамкою --- */
.how-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.how-section h2 {
    color: #e4e5e7;
    margin-bottom: 20px;
    font-size: 24px;
    text-transform: lowercase; 
}

.how-box {
    border: 2px solid #aa00ff; 
    border-radius: 16px;
    padding: 30px 40px;
    max-width: 600px;
    width: 90%;
    text-align: left;
    background: rgba(10, 0, 20, 0.7);
    box-shadow: 0 0 25px rgba(170, 0, 255, 0.2), inset 0 0 20px rgba(170, 0, 255, 0.1);
    position: relative;
}

.how-box::before {
    content: '';
    position: absolute;
    top: -2px; left: 20%; right: 20%;
    height: 2px;
    background: white;
    box-shadow: 0 0 10px white;
    opacity: 0.5;
}

.how-box p {
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #e4e5e7;
}

.highlight {
    color: #aa00ff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(170, 0, 255, 0.4);
    font-size: 17px;
}

/* --- футер --- */
.footer {
    padding: 30px 20px;
    font-size: 14px;
    color: #888;
    background-color: rgba(0,0,0,0.8);
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #222;
    position: relative;
    z-index: 10;
}

.footer a {
    color: #aa00ff;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    color: #fff;
    text-shadow: 0 0 10px #aa00ff;
}

/* --- попап --- */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 20;
    animation: fadeIn 0.3s;
}

.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    padding: 40px;
    border-radius: 20px;
    width: 320px;
    border: 2px solid #aa00ff;
    box-shadow: 0 0 50px rgba(170, 0, 255, 0.6);
    z-index: 30;
    text-align: center;
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 
    from { transform: translate(-50%, -50%) scale(0.5); opacity: 0; } 
    to { transform: translate(-50%, -50%) scale(1); opacity: 1; } 
}

.buttons button {
    margin: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    background: #aa00ff;
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: 0.2s;
    box-shadow: 0 0 10px rgba(170,0,255,0.3);
}

.buttons button:hover {
    background: #c542ff;
    box-shadow: 0 0 20px #aa00ff;
    transform: translateY(-2px);
}
