@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --yellow: #f5d86e;
    --bg-dark: #333;
    --light-gray: #dddcdc;
    --container-max-width: 860px;
    --container-min-width: 320px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

.container {
    max-width: var(--container-max-width);
    min-width: var(--container-min-width);
    width: 100%;
    margin: 0 auto;
    flex: 1;
    flex-direction: column;
}

.logo-link {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.top-bar {
    background: linear-gradient(
        135deg,
        rgba(243, 194, 17, 0.377) 0%,     
        rgba(240, 193, 25, 0.295) 50%,   
        rgba(243, 196, 24, 0.377) 100%    
    );
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 24px);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Контейнер для бликов в хедере */
.top-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 30%, /* Более яркие белые блики */
        transparent 70%
    );
    border-radius: 50px;
    opacity: 0.6;
    pointer-events: none;
}

/* Эффект градиентной рамки для хедера */
.top-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.3),
        rgba(245, 216, 110, 0.2),
        rgba(255, 255, 255, 0.3),
        rgba(245, 216, 110, 0.2)
    );
    border-radius: 52px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}



/* Адаптивность для планшетов */
@media (min-width: 768px) {
    .top-bar {
        width: calc(100%);
        max-width: min(1000px, 85vw);
        padding: clamp(12px, 3vw, 16px) clamp(20px, 4vw, 28px);
    }
}

/* Адаптивность для десктопов */
@media (min-width: 924px) {
    .top-bar {
        width: calc(100%);
        max-width: min(1000px, 80vw);
        padding: 14px clamp(24px, 4vw, 32px);
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 480px) {
    .top-bar {
        max-width: min(1000px, 95vw);
        padding: clamp(10px, 3vw, 14px) clamp(14px, 4vw, 18px);
        margin-bottom: 15px;
    }

}

@media (max-width: 360px) {
    .top-bar {
        width: calc(100% - 20px);
        padding: 8px 12px;
        margin-bottom: 12px;
    }
    
    .logo {
        height: 40px;
        width: 200px;
    }
}

.logo:hover {
    transform: scale(1.05);
}
.title{
    margin-bottom: 15px;
}

.back-btn-placeholder {
    width: 40px;
    height: 40px;
    visibility: hidden;
}

.back-btn {
    background: transparent;
    border: none;
    font-size: clamp(24px, 6vw, 28px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #000;
    transition: transform 0.2s;
    margin-right: 0; /* Убираем старый margin */
}

/* Адаптивность для маленьких экранов */
@media (max-width: 360px) {

    
    .back-btn,
    .back-btn-placeholder {
        width: 35px;
        height: 35px;
    }
}

.back-btn {
    background: transparent;
    border: none;
    font-size: clamp(24px, 6vw, 28px);
    margin-right: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}



main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Стили для списка конспектов */
.preview {
    background: var(--light-gray);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    color: #333;
    padding: 0;
    margin-bottom: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

@media (max-height: 1158px)  {
  .preview {
    max-height: 680px;
  }
}

@media (max-height: 900px)  {
  .preview {
    max-height: 600px;
  }
}

@media (max-height: 750px)  {
  .preview {
    max-height: 410px;
  }
}

.conspect-list {
    flex: 1;
    overflow-y: auto;
    padding: 25px 20px;
}

.conspect-item {
    margin-bottom: 11px;
    padding-bottom: 11px;
    position: relative;
}

.conspect-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.conspect-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 333px;
    height: 1px;
    background:  #7e7d7d;
}

.item-content {
    font-size: 15px;
    line-height: 1.5;
    color: #ffffff;
    text-align: left;
    font-weight: 500;
}

/* Стили для скроллбара */
.conspect-list::-webkit-scrollbar {
    width: 6px;
}

.conspect-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.conspect-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.conspect-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.conspect-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.conspect-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(333px, 90vw); /* Максимум 333px, но не более 90% ширины экрана */
    height: 1px;
    background: #7e7d7d;
}

.conspect-item:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(280px, 80vw, 650px); /* Минимум 280px, адаптивно до 800px */
    height: 1px;
    background: #7e7d7d;
}