/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

/* Десктоп (ноутбук) - без прокрутки */
@media (min-width: 1025px) {
    html, body {
        overflow: hidden;
    }

    body {
        min-height: 100vh;
        overflow: hidden;
    }
}

/* Для мобильных и планшетов - разрешаем прокрутку */
@media (max-width: 1024px) {
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    body {
        min-height: 100%;
        overflow-y: auto;
    }
}

body {
    font-family: 'Cormorant Garamond', serif;
    background: linear-gradient(135deg, #fef9f3 0%, #f7f1e9 100%);
    color: #5d4037;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/static/main/img/pic.png') repeat;
    background-size: 300px auto;
    opacity: 0.03;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 61%;
    left: 50%;
    width: 160vw;
    height: 80vh;
    background: url('/static/main/img/pic_u.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    opacity: 0.3;
}

/* Шапка */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 120px;
    background: linear-gradient(to bottom, rgba(254, 249, 243, 0.95) 0%, rgba(247, 241, 233, 0.9) 100%);
    backdrop-filter: blur(5px);
}

/* Кнопка Актуально сейчас */
.current-button {
    position: relative;
    top: 45px;
    left: 0;
    z-index: 1001;
}

.btn-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #f5e9dc 0%, #e8d8c5 100%);
    color: #7d6b58;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    min-width: 160px;
    height: 50px;
    border: 1px solid #e8d8c5;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.12);
}

.btn-current:hover {
    background: linear-gradient(135deg, #e8d8c5 0%, #d4c4b4 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(93, 64, 55, 0.18);
    color: #5d4037;
}

.btn-current i {
    font-size: 1.1rem;
    color: #8b7355;
}

/* Кнопки авторизации */
.auth-buttons {
    margin-left: auto;
    align-self: flex-start;
    margin-top: 20px;
    display: flex;
    gap: 20px;
    padding: 25px;
}

.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    min-width: 140px;
    height: 50px;
    border: 1px solid transparent;
    box-shadow: 0 4px 15px rgba(93, 64, 55, 0.12);
}

.btn-text {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 1.2rem;
}

.btn-auth i {
    font-size: 1.1rem;
}

.login-btn {
    background: #f5f0e8;
    color: #7d6b58;
    border: 1px solid #e8d8c5;
}

.login-btn:hover {
    background: #e8d8c5;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(93, 64, 55, 0.18);
}

.register-btn {
    background: #d4b8a7;
    color: #ffffff;
    border: 1px solid #c8a992;
}

.register-btn:hover {
    background: #c8a992;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(93, 64, 55, 0.18);
}

.profile-btn {
    background: #f5f0e8;
    color: #7d6b58;
    border: 1px solid #e8d8c5;
}

.profile-btn:hover {
    background: #e8d8c5;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(93, 64, 55, 0.18);
}

.logout-btn {
    background: #d4b8a7;
    color: #ffffff;
    border: 1px solid #c8a992;
}

.logout-btn:hover {
    background: #c8a992;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(93, 64, 55, 0.18);
}

/* Основной контент */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 130px 20px 40px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Контейнер с логотипом */
.title-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.site-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(139, 115, 85, 0.1));
}

.divider {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4b8a7, transparent);
    margin: 20px auto;
}

.subtitle {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    color: #a1887f;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Основные кнопки */
.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.main-btn {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: #5d4037;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(139, 115, 85, 0.08);
    border: 1px solid rgba(232, 216, 197, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.main-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(139, 115, 85, 0.15);
}

.btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(232, 216, 197, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-btn:hover .btn-overlay {
    opacity: 1;
}

.btn-icon {
    font-size: 3.5rem;
    margin-bottom: 25px;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.main-btn:hover .btn-icon {
    transform: scale(1.1);
}

.btn-patterns .btn-icon {
    background: linear-gradient(135deg, #f5e9dc 0%, #e8d8c5 100%);
    color: #8b7355;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.1);
}

.btn-embroidery .btn-icon {
    background: linear-gradient(135deg, #f0e6d6 0%, #e3d4c0 100%);
    color: #7d6b58;
    box-shadow: 0 4px 15px rgba(125, 107, 88, 0.1);
}

.btn-knitting .btn-icon {
    background: linear-gradient(135deg, #ede0d1 0%, #e0d0bc 100%);
    color: #8b7355;
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.1);
}

.btn-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #5d4037;
}

.btn-text p {
    font-family: 'EB Garamond', serif;
    font-size: 1.1rem;
    color: #a1887f;
    line-height: 1.6;
    font-weight: 300;
}

/* Кнопка для детей */
.kids-button-container {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.compact-btn {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 15px;
    padding: 15px 25px;
    text-decoration: none;
    color: #5d4037;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(139, 115, 85, 0.08);
    border: 1px solid rgba(212, 184, 167, 0.4);
    width: 100%;
    max-width: 450px;
    height: 70px;
}

.compact-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(139, 115, 85, 0.15);
    border-color: rgba(212, 184, 167, 0.6);
}

.compact-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8ede2 0%, #f0e2d1 100%);
    color: #8b7355;
    font-size: 1.4rem;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(139, 115, 85, 0.1);
    transition: all 0.3s ease;
}

.compact-btn:hover .compact-btn-icon {
    transform: scale(1.05);
    background: linear-gradient(135deg, #f0e2d1 0%, #e8d8c5 100%);
}

.compact-btn-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-width: 0;
}

.compact-btn-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: #5d4037;
    line-height: 1.2;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compact-btn-subtitle {
    font-family: 'EB Garamond', serif;
    font-size: 0.9rem;
    color: #a1887f;
    font-weight: 300;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(212, 184, 167, 0.2);
    color: #8b7355;
    font-size: 0.9rem;
    margin-left: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.compact-btn:hover .btn-arrow {
    background: rgba(212, 184, 167, 0.3);
    transform: translateX(3px);
}

.btn-kids .btn-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(232, 216, 197, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.compact-btn:hover .btn-overlay {
    opacity: 1;
}

/* Подвал */
.footer {
    text-align: center;
    padding: 4px 20px;
    background: rgba(232, 216, 197, 0.2);
    border-top: 1px solid rgba(212, 184, 167, 0.3);
    margin-top: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.footer p {
    font-family: 'EB Garamond', serif;
    font-size: 0.9rem;
    color: #8b7355;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin: 0;
}

/* ================================
   АДАПТИВНОСТЬ ДЛЯ РАЗНЫХ УСТРОЙСТВ
   ================================ */

/* Большие планшеты и маленькие ноутбуки (1024px - 769px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .header {
        height: 110px;
        padding: 15px;
    }

    .current-button {
        top: 40px;
    }

    .btn-current {
        padding: 10px 20px;
        min-width: 140px;
        height: 45px;
        font-size: 1.1rem;
    }

    .auth-buttons {
        padding: 20px;
        gap: 15px;
    }

    .btn-auth {
        padding: 10px 20px;
        min-width: 130px;
        height: 45px;
        font-size: 1.1rem;
    }

    .main-content {
        padding: 120px 20px 35px;
    }

    .site-logo {
        max-width: 280px;
    }

    .buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        margin-top: 30px;
    }

    .main-btn {
        padding: 25px;
    }

    .btn-icon {
        font-size: 3rem;
        width: 90px;
        height: 90px;
    }

    .btn-text h3 {
        font-size: 1.6rem;
    }

    .btn-text p {
        font-size: 1rem;
    }

    .kids-button-container {
        max-width: 450px;
        margin-top: 25px;
    }

    .compact-btn {
        height: 65px;
        padding: 15px 22px;
    }

    .compact-btn-icon {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
    }

    .compact-btn-title {
        font-size: 1.2rem;
    }

    .compact-btn-subtitle {
        font-size: 0.85rem;
    }
}

/* Планшеты (768px - 481px) */
@media (max-width: 768px) {
    body::after {
        opacity: 0.2;
        width: 140vw;
        height: 60vh;
    }

    .header {
        height: 100px;
        padding: 12px;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .current-button {
        position: static;
        order: 1;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
        top: 0;
    }

    .btn-current {
        display: inline-flex;
        min-width: 180px;
        height: 42px;
        font-size: 1rem;
        padding: 10px 20px;
    }

    .auth-buttons {
        order: 2;
        margin-left: 0;
        margin-top: 0;
        padding: 0;
        gap: 10px;
        width: auto;
    }

    .btn-auth {
        padding: 8px 16px;
        min-width: 100px;
        height: 40px;
        font-size: 0.95rem;
        gap: 6px;
    }

    .btn-text {
        font-size: 0.95rem;
    }

    .main-content {
        padding: 110px 15px 30px;
        min-height: calc(100vh - 140px);
    }

    .container {
        padding: 0 15px;
    }

    .title-container {
        margin-bottom: 30px;
    }

    .logo-container {
        margin-bottom: 10px;
    }

    .site-logo {
        max-width: 220px;
    }

    .divider {
        width: 150px;
        margin: 15px auto;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 25px;
    }

    .main-btn {
        padding: 20px;
        min-height: 180px;
    }

    .btn-icon {
        font-size: 2.8rem;
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .btn-text h3 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .btn-text p {
        font-size: 1rem;
    }

    .kids-button-container {
        max-width: 100%;
        margin-top: 20px;
        padding: 0 10px;
    }

    .compact-btn {
        height: 60px;
        padding: 12px 18px;
        border-radius: 12px;
    }

    .compact-btn-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        border-radius: 10px;
        margin-right: 12px;
    }

    .compact-btn-title {
        font-size: 1.1rem;
    }

    .compact-btn-subtitle {
        font-size: 0.8rem;
    }

    .btn-arrow {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .footer {
        padding: 8px 15px;
    }

    .footer p {
        font-size: 0.8rem;
    }
}

/* Мобильные телефоны (480px - 320px) */
@media (max-width: 480px) {
    body::after {
        opacity: 0.15;
        width: 120vw;
        height: 50vh;
    }

    .header {
        height: 90px;
        padding: 10px;
    }

    .btn-current {
        min-width: 160px;
        height: 38px;
        font-size: 0.9rem;
        padding: 8px 16px;
        gap: 5px;
    }

    .btn-current i {
        font-size: 0.9rem;
    }

    .auth-buttons {
        gap: 8px;
    }

    .btn-auth {
        padding: 6px 12px;
        min-width: 85px;
        height: 36px;
        font-size: 0.85rem;
        gap: 4px;
        border-radius: 25px;
    }

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

    .btn-auth i {
        font-size: 0.85rem;
    }

    .main-content {
        padding: 95px 10px 25px;
        min-height: calc(100vh - 120px);
    }

    .container {
        padding: 0 10px;
    }

    .title-container {
        margin-bottom: 20px;
    }

    .site-logo {
        max-width: 180px;
    }

    .divider {
        width: 120px;
        margin: 12px auto;
    }

    .subtitle {
        font-size: 1rem;
        padding: 0 5px;
    }

    .buttons-grid {
        gap: 15px;
        margin-top: 20px;
    }

    .main-btn {
        padding: 18px;
        min-height: 160px;
        border-radius: 18px;
    }

    .btn-icon {
        font-size: 2.5rem;
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }

    .btn-text h3 {
        font-size: 1.3rem;
    }

    .btn-text p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .kids-button-container {
        margin-top: 15px;
        padding: 0 5px;
    }

    .compact-btn {
        height: 55px;
        padding: 10px 15px;
        border-radius: 10px;
    }

    .compact-btn-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-radius: 8px;
        margin-right: 10px;
    }

    .compact-btn-title {
        font-size: 1rem;
    }

    .compact-btn-subtitle {
        font-size: 0.75rem;
    }

    .btn-arrow {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
        margin-left: 8px;
    }

    .footer {
        padding: 6px 10px;
    }

    .footer p {
        font-size: 0.75rem;
    }
}

/* Очень маленькие телефоны (менее 320px) */
@media (max-width: 320px) {
    .site-logo {
        max-width: 150px;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .main-btn {
        padding: 15px;
        min-height: 150px;
    }

    .btn-icon {
        font-size: 2.2rem;
        width: 60px;
        height: 60px;
    }

    .btn-text h3 {
        font-size: 1.2rem;
    }

    .btn-text p {
        font-size: 0.85rem;
    }

    .compact-btn {
        height: 50px;
        padding: 8px 12px;
    }

    .compact-btn-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .compact-btn-title {
        font-size: 0.95rem;
    }

    .compact-btn-subtitle {
        font-size: 0.7rem;
    }
}

/* Ландшафтная ориентация для мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 70px;
        padding: 8px;
    }

    .current-button {
        top: 25px;
    }

    .btn-current {
        height: 35px;
        padding: 6px 12px;
        font-size: 0.9rem;
        min-width: 140px;
    }

    .auth-buttons {
        padding: 10px;
        margin-top: 10px;
    }

    .btn-auth {
        height: 35px;
        padding: 5px 10px;
        min-width: 90px;
        font-size: 0.9rem;
    }

    .main-content {
        padding: 80px 15px 25px;
    }

    .site-logo {
        max-width: 150px;
    }

    .buttons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 20px;
    }

    .main-btn {
        padding: 15px;
        min-height: 140px;
    }

    .btn-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .btn-text h3 {
        font-size: 1.2rem;
    }

    .btn-text p {
        font-size: 0.85rem;
    }

    .kids-button-container {
        margin-top: 15px;
    }

    .compact-btn {
        height: 45px;
        padding: 8px 12px;
    }
}
/* Недоступные кнопки */
.btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(40%);
    pointer-events: none;
}