/* === Обнуление === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Orbitron', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    background: transparent;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* === Фон === */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/games.jpg') no-repeat center center;
    background-size: cover;
    z-index: -1;
    filter: brightness(0.3);
}

/* === Логотип === */
header {
    padding: 20px;
    position: relative;
    text-align: center;
}

.logo {
    max-width: 300px;
    height: auto;
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.logo img {
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
}

/* === Меню === */
.navbar {
    position: relative;
    padding: 10px 0;
    text-align: center;
    z-index: 9;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.navbar li a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Orbitron', sans-serif;
    position: relative;
}

.navbar li:not(.store-btn) a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(to right, #6e45e2, #88d3ce);
    transition: width 0.3s ease;
}

.navbar li:not(.store-btn) a:hover::after {
    width: 100%;
}

.navbar .store-btn a {
    background: #ffcc00 !important;
    color: #000 !important;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    position: relative;
    z-index: 2;
}

.navbar .store-btn a::after {
    display: none !important;
}

.navbar .store-btn a:hover {
    background: linear-gradient(135deg, #6e45e2, #88d3ce) !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(110, 69, 226, 0.7) !important;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.navbar li a:hover {
    animation: pulse 1s infinite;
}

/* === Карточки === */
.launcher-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px 1.5rem 60px;
    padding-bottom: max(env(safe-area-inset-bottom, 20px), 60px);
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2.5rem;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    font-family: 'Orbitron', sans-serif;
}

.launcher-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
    width: 100%;
    max-width: 1200px;
}

.launcher-card {
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(100, 100, 255, 0.2);
    border-radius: 24px;
    padding: 1.8rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 380px;
}

.launcher-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(60, 60, 255, 0.3);
    background: rgba(40, 40, 50, 0.7);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 50%;
    margin: 0 auto 1.2rem;
    box-shadow: 0 4px 12px rgba(110, 69, 226, 0.4);
    font-family: 'Orbitron', sans-serif;
}

.launcher-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
}

.launcher-card p {
    color: #ccc;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.card-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0.8rem 0;
}

.card-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px;
    transition: transform 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.card-icon:hover {
    transform: scale(1.05) rotate(5deg);
}

.launcher-btn {
    display: inline-block;
    background: #ffcc00;
    color: #000;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    font-family: 'Orbitron', sans-serif;
    align-self: center;
    margin-top: auto;
}

.launcher-btn:hover {
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    color: white;
    box-shadow: 0 0 20px rgba(110, 69, 226, 0.7);
    animation: pulse 1s infinite;
}

/* === Футер — ТОЧНО КАК В ВАШЕМ КОДЕ === */
.footer-social {
    padding: 0rem 0;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    text-align: center;
}

.social-container {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-block;
    padding: 0.75rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.social-icon img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.social-icon:hover img {
    filter: hue-rotate(30deg);
}

.copyright {
    color: #ccc;
    font-size: 0.85rem;
    padding: 2px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: 'Orbitron', sans-serif;
}

/* === МОДАЛЬНОЕ ОКНО — ПОЛНОСТЬЮ АДАПТИРОВАНО === */
.modal {
    display: none;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
    justify-content: center;
    align-items: center;
    padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px) env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px);
}

.modal-content {
    background: #1e1e2a;
    border: 2px solid rgba(100, 100, 255, 0.3);
    border-radius: 24px;
    padding: 1.5rem;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 30px rgba(60, 60, 255, 0.5);
    position: relative;
    animation: slideIn 0.4s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    z-index: -1;
    border-radius: 26px;
    filter: blur(10px);
    opacity: 0.7;
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close:hover {
    color: white;
}

.step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    color: white;
    font-size: 1.8rem;
    font-weight: 900;
    border-radius: 50%;
    margin: 0 auto 1rem;
    box-shadow: 0 0 15px rgba(110, 69, 226, 0.6);
    font-family: 'Orbitron', sans-serif;
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    font-weight: 600;
}

.instruction-text {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.ip-block {
    background: rgba(40, 40, 60, 0.5);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.ip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    background: rgba(50, 50, 70, 0.4);
    border-radius: 12px;
    transition: background 0.2s;
}

.ip-item:hover {
    background: rgba(60, 60, 80, 0.5);
}

.ip-code {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: #ffcc00;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    transition: all 0.2s;
}

.ip-code:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 204, 0, 0.5);
    transform: scale(1.05);
}

.ip-desc {
    font-size: 0.9rem;
    color: #aaa;
    flex: 1;
    margin-left: 1rem;
    text-align: right;
}

.how-to-block {
    background: rgba(40, 40, 60, 0.5);
    border-radius: 16px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.how-to-block h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.how-to-block ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
    color: #ccc;
}

.how-to-block li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.screenshot-container {
    text-align: center;
    margin: 1.5rem 0;
    width: 100%;
}

.screenshot-container img {
    max-width: 100%;
    border-radius: 12px;
    border: 2px solid rgba(100, 100, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.screenshot-container img:hover {
    transform: scale(1.02);
}

.screenshot-caption {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 0.5rem;
}

.modal-footer {
    text-align: center;
    margin-top: 1.5rem;
    width: 100%;
}

.modal-btn {
    background: linear-gradient(135deg, #6e45e2, #88d3ce);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(110, 69, 226, 0.4);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    width: 100%;
    max-width: 300px;
}

.modal-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(110, 69, 226, 0.7);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 992px) {
    .launcher-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .logo {
        position: relative;
        top: auto;
        left: auto;
        margin: 0 auto 20px;
        max-width: 200px;
    }

    .logo img {
        height: 32px;
    }

    .navbar ul {
        flex-direction: column;
        gap: 10px;
        padding: 0 1rem;
    }

    .navbar li a {
        padding: 12px 20px;
        width: 80%;
        max-width: 250px;
        margin: 0 auto;
        display: block;
        font-size: 1rem;
    }

    .launcher-section {
        padding: 90px 1rem 50px;
        padding-bottom: max(env(safe-area-inset-bottom, 20px), 50px);
    }

    .section-title {
        font-size: 1.8rem;
    }

    .launcher-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .launcher-card {
        min-height: auto;
        padding: 1.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .launcher-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .card-icon {
        width: 60px;
        height: 60px;
    }

    /* Модальное окно — мобильная адаптация */
    .modal-content {
        padding: 1.2rem;
        margin: 10% auto;
        max-width: 95%;
        max-height: 85vh;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }

    .modal-header h3 {
        font-size: 1.3rem;
    }

    .instruction-text {
        font-size: 0.85rem;
    }

    .ip-code {
        font-size: 0.9rem;
        padding: 0.3rem 0.6rem;
    }

    .ip-desc {
        font-size: 0.85rem;
        margin-left: 0.5rem;
    }

    .how-to-block h4 {
        font-size: 1.1rem;
    }

    .screenshot-container img {
        max-width: 90%;
    }

    .modal-btn {
        padding: 10px 20px;
        font-size: 1rem;
        max-width: 280px;
    }

    .social-icon img {
        width: 32px;
        height: 32px;
    }

    .copyright {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.6rem;
    }

    .launcher-card h3 {
        font-size: 1.25rem;
    }

    .launcher-card p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .launcher-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .card-icon {
        width: 50px;
        height: 50px;
    }

    .ip-code {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }

    .screenshot-caption {
        font-size: 0.8rem;
    }

    .modal-content {
        padding: 1rem;
        margin: 15% auto;
        max-width: 95%;
    }

    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .modal-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
        max-width: 260px;
    }
}