body {
    margin: 0;
    padding: 0;
}
img {
    max-width: 100%;
}

.mobile-auth-btn {
    flex-shrink: 0;
    margin: 0 0.5rem;
}

.btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    background: #1a73e8;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.btn-sm:hover {
    background: #1557b0;
}

.mobile-nav-user {
    font-size: 1.1rem;
    cursor: pointer;
    color: white;
    white-space: nowrap;
}



.header-mobile {
    display: none;
    background: #0f172a;
    color: white;
    padding: 0.8rem 1rem;
}

.mobile-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.mobile-logo {
    flex: 1;
}

.mobile-logo a {
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.mobile-auth {
    flex-shrink: 0;
}

.mobile-auth .btn-sm {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    background: #1a73e8;
    color: white;
    border-radius: 6px;
    text-decoration: none;
}

.mobile-nav-user {
    font-size: 1.5rem;
    cursor: pointer;
}

/* Бургер */
.burger {
    width: 28px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.burger span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Выпадающее меню */
.mobile-nav {
    display: none;
    margin-top: 0.8rem;
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin-bottom: 0.5rem;
}

.mobile-nav-list a,
.mobile-nav-list .mobile-nav-user {
    color: white;
    font-size: 1rem;
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 0.3rem 0 !important;
    border: none !important;
}

/* Показать мобильную шапку только на портретах */
@media screen and (orientation: portrait) {
    .header-desktop {
        display: none !important;
    }
    .header-mobile {
        display: block;
    }
}

.mobile-user {
    display: block;
}
.user-icon-mobile {
    display: inline-block;
}
.user-icon {
    display: none;
}

.hero {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: white;
  text-align: center;
  padding: 4vh 2vw;
  border-radius: 16px;
  margin: 2vh 4vw;
}

.footer {
    flex-shrink: 0;
    background: #333;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

.video-block {
background: white;
  border-radius: 12px;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 4px 12px;
  margin: 2vh auto;
  display: block;
  max-width: 98vw;
  overflow: hidden;
  border: 3px groove #fff;
}

.publish-overlay {
  position: absolute;
  top: 46%;
  left: 15%;
  width: 70%;
  color: white;
  display: block;
  border-radius: 12px;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 1rem;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.71);
}


/* ========== СТРАНИЦЫ АВТОРИЗАЦИИ ========== */
.auth-page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 1rem;
    min-height: 70vh;
}

.auth-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: #0f172a;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #1e293b;
}

.form-input {
    width: 90%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.auth-submit {
    display: block;
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    background: #0f172a;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1.5rem;
}

.auth-submit:hover {
    background: #1e293b;
}

.auth-error {
    color: #dc3545;
    text-align: center;
    margin-top: 0.5rem;
    font-weight: 500;
}

.auth-link {
    text-align: center;
    margin-top: 1.2rem;
    color: #64748b;
}

.auth-link a {
    color: #1a73e8;
    font-weight: 600;
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.2rem;
    }
}

/* Hero */
.hero h1 {
    font-size: 1.8rem;
}
.hero p {
    font-size: 1rem;
}

/* Видеоблок: вертикально */
.video-main-row {
display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-content: center;
  grid-gap: 1vh 1vw;
}
.video-preview {
position: relative;
    width: 100%;
}
.video-info h3 {
    font-size: 1.3rem;
}

/* Проекты */
.project-block {
    flex-direction: column;
}
.gallery-thumbs img {
    width: calc(25% - 3.75px);
}
.action-buttons {
    flex-direction: column;
}
.action-buttons .btn {
    width: 100%;
}


.shop-categories {
    display: none !important;
}
.mobile-category-select {
    display: block;
}
.shop-layout {
    flex-direction: column;
}
.shop-categories a {
    max-width: none;
}
.products-grid {
    grid-template-columns: 1fr;
}
.no-products {
    grid-column: span 1;
}
.product-card {
    flex-direction: column;
}
.card-left, .card-right {
    flex: auto;
}

/* Обучение */
.education-layout {
    flex-direction: column;
}
.lesson-block {
    flex-direction: column;
}
.lesson-media {
    flex: auto;
    padding-bottom: 56.25%;
}

/* Программы */
.downloads-layout {
    flex-direction: column;
}
.program-card {
    flex-direction: column;
    align-items: flex-start;
}
.program-action {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
}
.program-action .btn {
    width: 100%;
    text-align: center;
}

/* Карточка товара */
.product-detail {
    flex-direction: column;
}
.projects-grid {
    grid-template-columns: 1fr;
}

/* Адаптивная таблица */
.table-responsive {
    overflow-x: auto;
}
.table th,
.table td {
    white-space: nowrap;
}
.main {
    overflow-x: auto;
}

/* Бот */
.bot-modal {
    width: 90%;
    right: 5%;
    bottom: 10px;
}

/* Формы авторизации */
.auth-card {
    padding: 2rem 1.2rem;
}

/* Селекты и инпуты в формах */
.main form .form-control,
.main form input[type="text"],
.main form input[type="url"],
.main form input[type="number"],
.main form input[type="date"],
.main form input[type="file"],
.main form select,
.main form textarea {
    max-width: 100%;
}