/* ===== ГЛАВНАЯ СТРАНИЦА ===== */

/* Контейнер для печатающегося текста */
.typing-wrapper-container {
    max-width: calc(100% - 450px);
    margin-right: 20px;
    text-align: center;
}

.typing-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    min-height: 80px;
    position: relative;
    width: 100%;
}

#output {
    color: var(--bright-green);
    font-size: 54px;
    font-weight: bold;
    display: inline-block;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Блик поверх текста */
#output::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 45%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.3) 55%,
        transparent 70%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shine 3s infinite linear;
    pointer-events: none;
    z-index: 2;
}

@keyframes shine {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

/* Бликующий курсор */
.cursor {
    display: inline-block;
    width: 4px;
    height: 50px;
    background-color: var(--bright-green);
    margin-left: 8px;
    animation: cursor-blink 1s infinite;
    box-shadow: 0 0 10px var(--bright-green), 0 0 20px var(--bright-green);
    vertical-align: middle;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Контейнер для секций с контентом - с отступом от фонового изображения */
.content-section {
    max-width: calc(100% - 450px);
    margin-right: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.content-section .product-description {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.product-description {
    font-weight: bold;
    color: var(--yellow);
    font-size: 22px;
    text-shadow: 1px 1px 0px black;
    text-align: left;
    margin: 15px 0;
    max-width: 800px;
}

.product-head {
    font-weight: bold;
    color: var(--primary-green);
    font-size: 30px;
    text-shadow: 1px 1px 0px black;
    margin-top: 20px;
    text-align: center;
    display: block;
    width: 100%;
}

/* Заголовок h1 - Рейтинг баз данных */
.index-page h1 {
    max-width: calc(100% - 450px);
    margin-right: 20px;
    text-align: left;
}

/* Уменьшенный размер шрифта для заголовка рейтинга БД */
.db-rating-title {
    font-weight: bold;
    color: var(--primary-green);
    font-size: 30px;
    text-shadow: 1px 1px 0px black;
    text-align: center;
    display: block;
    margin: 20px auto 10px;
    max-width: 790px;
}

/* Галерея изображений */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    justify-content: flex-start;
    max-width: calc(100% - 450px);
    margin-right: 20px;
}

.about-link {
    display: inline-block;
    text-decoration: none;
    margin: 15px 0;
}

.tech-links {
    margin: 20px 0;
    text-align: left;
}

.tech-links a {
    display: inline-block;
    margin-top: 20px;
    color: var(--primary-green);
    text-decoration: none;
    font-size: 18px;
    text-align: left;
    margin-right: 15px;
}

.tech-links a:hover {
    text-decoration: underline;
}

.tech-links img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

/* Таблица баз данных */
.database-table {
    background: rgba(167, 103, 180, 0.1);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    overflow-x: auto;
    max-width: 790px;
    margin-left: auto;
    margin-right: auto;
}

.database-table pre {
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    text-align: left;
    margin: 0;
    color: var(--white);
    font-size: 14px;
}

.source-note {
    font-size: 14px;
    color: var(--white);
    opacity: 0.8;
    margin-top: 10px;
    text-align: left;
}

.refresh-section {
    margin: 20px 0;
    max-width: calc(100% - 450px);
    margin-right: 20px;
}

.refresh-button {
    background-color: var(--primary-green);
    color: black;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.refresh-button:hover {
    background-color: var(--bright-green);
}

.last-updated {
    font-style: italic;
    color: var(--white);
    opacity: 0.7;
    margin-top: 10px;
}

/* Адаптивность для мобильных */
@media (max-width: 1200px) {
    .content-section,
    .image-gallery,
    .index-page h1,
    .db-rating-title,
    .refresh-section,
    .typing-wrapper-container {
        max-width: calc(100% - 350px);
    }
}

@media (max-width: 900px) {
    .content-section,
    .image-gallery,
    .index-page h1,
    .db-rating-title,
    .refresh-section,
    .typing-wrapper-container {
        max-width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .typing-wrapper {
        min-height: 60px;
    }
    
    #output {
        font-size: 36px;
    }
    
    .cursor {
        height: 36px;
        width: 3px;
    }
    
    .product-description {
        font-size: 18px;
        max-width: 100%;
    }
    
    .product-head {
        font-size: 24px;
    }

    .db-rating-title {
        font-size: 24px;
        max-width: 100%;
    }
    
    .content-section,
    .image-gallery,
    .index-page h1,
    .db-rating-title,
    .refresh-section,
    .typing-wrapper-container {
        max-width: 100%;
        margin-right: 0;
    }
    
    .database-table {
        max-width: 100%;
    }
    
    .tech-links a {
        font-size: 14px;
    }
    
    .tech-links img {
        height: 30px;
    }
}

@media (max-width: 480px) {
    .typing-wrapper {
        min-height: 50px;
    }
    
    #output {
        font-size: 28px;
    }
    
    .cursor {
        height: 28px;
        width: 3px;
    }
    
    .product-description {
        font-size: 16px;
    }
    
    .product-head {
        font-size: 20px;
    }

    .db-rating-title {
        font-size: 18px;
    }
    
    .image-gallery {
        flex-direction: column;
    }
    
    .tech-links a {
        font-size: 12px;
        margin-right: 10px;
    }
    
    .tech-links img {
        height: 25px;
    }
}
