/* =======================
   RESET + BASE
======================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background: #fff;
    font-family: "OldStandardTT-Regular";
    
}

/* =======================
   HEADER (FIXED)
======================= */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 130px;

    background: #77c2ffd7;
    color: #fff;

    display: flex;
    align-items: center;
    z-index: 1000;

    border-bottom: 1px solid #333;
}

.header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =======================
   MAIN CONTENT
======================= */

main {
    flex: 1;
    padding-top: 110px; /* высота хедера */
}

/* hero */
.hero {
    padding: 80px 24px;
    background: #f6f6f6;
    border-bottom: 1px solid #ddd;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
    align-items: center;
}

.hero-img {
    width: 150px;
}

/* dynamic loaded content */

#info {
    padding: 40px 20px;
    text-align: justify;
    margin-left: 20px;
    margin-right: 20px;
    flex: 1 0 auto;
    font-size: 18px;
    line-height: 1.75;
}


.logo {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 24px;
    font-size: 16px;
}
.nav a:hover {
    text-decoration: underline;
}


/* =======================
   MODAL (FULL WORKING BLOCK)
======================= */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    justify-content: center;
    align-items: center;
    z-index: 999999999 !important; /* всегда поверх хедера */
}

.modal-window {
    background: #fff;
    width: 360px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: modalShow 0.15s ease-out;
}

.modal-header {
    background: #f0f0f0;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #555;
}

.modal-body {
    padding: 16px;
}

.modal-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

/* поля */
.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.field label {
    margin-bottom: 4px;
    font-size: 14px;
    color: #444;
}

.field input {
    padding: 8px 10px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    font-size: 14px;
}

/* animation */
@keyframes modalShow {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}



/* =======================
   BUTTONS
======================= */
.btn {
    padding: 6px 14px;
    background: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover { background: #444; }

.btn-secondary { background: #444; }
.btn-secondary:hover { background: #555; }

.btn-primary { background: #0066ff; }
.btn-primary:hover { background: #0055dd; }

.btn-danger { background: #a11; }
.btn-danger:hover { background: #b22; }
.btn-registration {margin-bottom: 90px;}
.btn-logout {display:none; margin-bottom: 90px;}


/* Profile button */
.profile-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;              /* dark gray */
  background-color: #f3f4f6;   /* light gray */
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  margin-bottom: 10px;
}

.profile-btn:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.profile-btn:active {
  background-color: #d1d5db;
}

.profile-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}


/* =======================
   TOP SWITCH MENU
======================= */
.center-switch {
    display: flex;
    gap: 10px;
    margin: 0 10px;
    flex-wrap: wrap;
}

/* Mobile */

@media (max-width: 800px) {

    .center-switch button {
        flex: 0 0 calc(40% - 10px); 
    }

    /* HEADER */
    .fixed-header {
        height: auto;
        padding: 10px 0;
    }

    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* TOP ROW: logo + auth + profile + lang */
    .header-inner > div:first-child,
    .auth-buttons,
    .profile-btn {
        margin: 0;
    }

    /* Center block becomes grid */
    .center-switch {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        margin: 0;
    }

    .center-switch button {
        width: 100%;
        font-size: 13px;
        padding: 8px 6px;
    }

    /* Table / A4 buttons stack nicely */
    .center-switch > div {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .center-switch > div button {
        margin: 0 !important;
    }

    /* Auth + profile + lang row */
    .auth-buttons {
        display: flex;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
    }

    .profile-btn {
        padding: 6px 10px;
        font-size: 13px;
        margin-bottom: 0;
    }

    #langSelect {
        height: 32px;
        font-size: 13px;
    }

    /* Remove desktop hacks */
    .btn-registration,
    .btn-logout {
        margin-bottom: 0;
    }

    /* MAIN padding fix */
    main {
        padding-top: 220px;
    }


}


/* =======================
   AUTH BUTTONS
======================= */
.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* =======================
   PAGE BLOCK (TUTORIAL, PRICES)
======================= */
.page-block {
    padding: 20px 10px;
    max-width: 900px;
    margin: 0 auto;
    font-family: "Play-Regular";
    line-height: 1.75;
}

.page-block h1 {
    margin-bottom: 12px;
}

.page-block h2 {
    margin-top: 25px;
    margin-bottom: 10px;
}

.page-block p {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* =======================
   VIDEO BLOCK
======================= */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 20px auto;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* =======================
   PRICING CARDS (ВСЕ СТИЛИ)
======================= */

.pricing-container {
    display: flex;
    gap: 16px;

    overflow-x: scroll; 
    overflow-y: hidden;

    padding: 10px;
    scroll-snap-type: x mandatory;

    scrollbar-width: auto;     
    scrollbar-color: #6b7280 #e5e7eb;
}



.pricing-container::-webkit-scrollbar {
    height: 12px;  
}

.pricing-container::-webkit-scrollbar-track {
    background: #e5e7eb;  
    border-radius: 6px;
}

.pricing-container::-webkit-scrollbar-thumb {
    background: #6b7280;  
    border-radius: 6px;
}

.pricing-container::-webkit-scrollbar-thumb:hover {
    background: #374151;
}


.pricing-card {
    min-width: 220px;
    flex-shrink: 0;
    scroll-snap-align: start;

    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #ddd;

    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);

    transition: transform 0.15s ease;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.price {
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
}

.pricing-card button {
    margin-top: 12px;
    width: 100%;
}


.code {
    color: #b0dfff;
    background: black;
    font-family: "RobotoCondensed-regular";
}



/* HOWTO SECTION STYLES */
.howto {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px 30px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    line-height: 1.6;
    justify-content: center;
    align-items: center;
}

.howto h2 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.howto h3 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 12px;
    font-weight: 600;
}

.howto h4 {
    font-size: 18px;
    margin-top: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.howto p {
    margin-bottom: 14px;
    font-size: 16px;
}

.howto ul,
.howto ol {
    margin-left: 20px;
    margin-bottom: 18px;
}

.howto li {
    margin-bottom: 6px;
}

.howto code {
    background: #f4f4f4;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 14px;
    font-family: Consolas, monospace;
}

.howto hr {
    margin: 35px 0;
    border: none;
    border-top: 1px solid #ddd;
}


.logo-icon {
  width: 20px;
  height: 20px;
}

.logo-title {
  font-size: 18px;
  font-weight: 600;
}

.logo-accent {
  color: #1977ff;
}


/* Responsive */
@media (max-width: 600px) {
    .howto {
        padding: 15px 18px;
    }

    .howto h2 {
        font-size: 24px;
    }

    .howto h3 {
        font-size: 20px;
    }

    .howto h4 {
        font-size: 17px;
    }
}
