/* Основные стили и переменные */
:root {
    --bg-dark: #1a1a1a;
    --text-light: #f5f5f5;
    --accent-color: #f44336;
    --font-family-main: 'Montserrat', sans-serif;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-family-main);
    color: var(--text-light);
    background-color: var(--bg-dark);
}

.card-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.card-page {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.8s ease-in-out, opacity 0.8s ease-in-out;
}

.card-page.active-page {
    transform: translateX(0);
    opacity: 1;
}

/* Стили для первой страницы (информация о тебе) */
.card-title {
    font-size: 4em;
    font-weight: 700;
    margin: 0;
    margin-bottom: 30px;
    cursor: default;
    user-select: none;
}

.card-subtitle {
    font-size: 1.5em;
    font-weight: 400;
    margin-top: 10px;
    cursor: default;
    user-select: none;
    display: inline !important;
}

#blinker {
    display: inline-block !important;
    width: 1ch;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}


.social-links {
    margin-top: 20px;
}

.social-links a {
    color: var(--text-light);
    font-size: 2em;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* Стили для второй страницы (навыки) */
/* Убрали overflow-y: auto; */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 25px;
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
}

.skill-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    cursor: default;
}

.skill-item:hover {
    transform: translateY(-8px) scale(1.05);
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.4);
    z-index: 1;
}

.skill-item:hover i {
    text-shadow: 0 0 10px var(--accent-color);
    transform: scale(1.1);
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.skill-item i {
    font-size: 3em;
    color: var(--accent-color);
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.skill-item h3 {
    margin: 0;
    font-size: 1em;
    color: inherit;
    text-align: center;
    user-select: none;
}

/* Стили для третьей страницы (форма) */
.form-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 20px;
    user-select: none;
}

.contact-form {
    display: flex;
    flex-direction: column;
    width: 80%;
    max-width: 400px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    margin-bottom: 20px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-family: inherit;
    resize: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.hidden-honeypot {
    display: none;
    visibility: hidden;
}

.contact-form button {
    padding: 15px;
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #d32f2f;
}

/* Стили для кнопок навигации (стрелок) */
.nav-btn {
    position: absolute;
    top: 52%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 3em;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s;
}

.nav-btn:hover {
    opacity: 0.7;
}

.left-btn {
    left: 20px;
}

.right-btn {
    right: 20px;
}

.nav-btn.disabled {
    opacity: 0.3;
    cursor: default;
}

.nav-btn.disabled:hover {
    opacity: 0.3;
}






    #flap {
      display: flex;
      font-size: 2em;
    }

    .letter {
      width: 1em;
      height: 1.2em;
      margin: 0 3px;
      overflow: hidden;
      position: relative;
    }

    .reel {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
    }

    .char {

      text-align: center;
      line-height: 1.2em;
    }






/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    #flap {
      display: flex;
      font-size: 1em;
    }
    .letter {
      width: 1.1em;
      height: 1.2em;
      margin: 0 0;
      overflow: hidden;
      position: relative;
    }
    .card-subtitle {
        font-size: 1em;
    }
    .nav-btn {
        font-size: 2em;
        top: 49.5%;
    }
    .skills-grid {
        /* Измененная сетка: 3 колонки с меньшим minmax */
        grid-template-columns: repeat(3, minmax(60px, 1fr));
        gap: 10px;
    }
    .skill-item i {
        font-size: 1.6em; /* Уменьшаем размер иконок еще больше */
    }
    .skill-item h3 {
        font-size: 0.8em; /* Уменьшаем размер текста */
    }
    .skill-item {
        padding: 15px; /* Уменьшаем отступы внутри плиток */
    }
    .contact-form {
        width: 90%;
    }
}