* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #eef2f7;
    color: #2d3436;
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

html {
    scroll-behavior: smooth;
}

/* ===== ШАПКА ===== */
.header {
    background: #1a1a2e;
    padding: 18px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

.logo {
    background: #e94560;
    color: #fff;
    font-weight: 700;
    font-size: 26px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
    margin-left: 10px;
}

.logo img {
    width: 70px;
    height: auto;
    display: block;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px;
    margin: 0 auto;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}

.nav a:hover {
    border-bottom-color: #e94560;
    color: #e94560;
}

.contact-btn {
    background: #e94560;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
    flex-shrink: 0;
    margin-right: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.contact-btn:hover {
    background: #c0392b;
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.45);
}

/* ===== СЕКЦИИ ===== */
section {
    padding: 70px 0;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a2e;
    text-align: center;
    margin-bottom: 50px;
}

.section-title.white {
    color: #fff;
}

/* ===== БЛОКИ ===== */
.section-welcome,
.section-about,
.section-books,
.section-rubrics {
    background: #ffffff;
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.section-welcome:hover,
.section-about:hover,
.section-books:hover,
.section-rubrics:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
    border-color: rgba(233, 69, 96, 0.20);
}

.section-welcome { margin: 30px 20px 20px; }
.section-about { margin: 20px 20px; }
.section-books { margin: 20px 20px; }
.section-rubrics { margin: 20px 20px 30px; }

/* ===== ПРИВЕТСТВИЕ ===== */
.section-welcome .text {
    font-size: 22px;
    text-align: justify;
    max-width: 920px;
    margin: 0 auto 35px;
    line-height: 1.8;
}

.quote-block {
    max-width: 850px;
    margin: 0 auto;
    background: #f5f7fb;
    padding: 30px 40px;
    border-left: 6px solid #e94560;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 600;
    font-style: italic;
    text-align: center;
}

/* ===== О СЕБЕ ===== */
.about-grid {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.about-text { flex: 2; }

.about-text .highlight {
    display: block;
    margin-top: 25px;
    padding: 22px 28px;
    background: #f5f7fb;
    border-left: 6px solid #e94560;
    border-radius: 12px;
    font-weight: 700;
    font-style: italic;
}

.about-photo { flex: 1; text-align: center; }

.about-img {
    width: 230px;
    height: 230px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #e94560;
    box-shadow: 0 8px 30px rgba(233, 69, 96, 0.15);
}

/* ===== КНИГИ ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.book-card {
    background: #f5f7fb;
    padding: 32px 20px 28px;
    border-radius: 20px;
    text-align: center;
    transition: 0.4s;
    border-bottom: 5px solid transparent;
}

.book-card:hover {
    transform: translateY(-10px);
    border-bottom-color: #e94560;
    background: #fff;
}

.book-card .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.book-card h3 {
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.book-card p {
    color: #636e72;
    font-style: italic;
    font-size: 15px;
}

/* ===== ДОСТИЖЕНИЯ ===== */
.section-achievements {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    text-align: center;
    margin: 20px;
    border-radius: 24px;
    padding: 50px 40px 60px;
}

/* ===== КУБОК ===== */
.trophy-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 160px;
    padding-top: 5px;
}

#goldcup {
    width: 110px;
    animation: trophyFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 8px 20px rgba(255, 200, 50, 0.4));
}

@keyframes trophyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

#middlearea {
    position: relative;
    margin: 0 auto;
    width: 72px;
    height: 82px;
    border-radius: 0% 0% 50% 50%;
    background: #ffd700;
    box-shadow: inset 22px 0px 0px #f0a500;
}

#middlearea:before {
    content: "";
    position: absolute;
    top: 0px;
    left: -5px;
    width: 82px;
    height: 9px;
    background: #ffd700;
    box-shadow: inset 22px 0px 0px #f0a500, 0px 2px 0px #e8960a;
    z-index: 2;
    border-radius: 2px;
}

#middlearea:after {
    content: "";
    position: absolute;
    bottom: -34px;
    left: 32px;
    width: 9px;
    height: 36px;
    background: #ffd700;
    box-shadow: inset 3px 0px 0px #f0a500;
    z-index: -1;
}

#cupholder {
    position: absolute;
    width: 65px;
    height: 9px;
    background: #ffd700;
    box-shadow: inset 3px 0px 0px #f0a500, inset 0px 3px 0px #e8960a;
    bottom: -50px;
    left: 30px;
    z-index: 2;
    border-radius: 2px;
}

#cupholder:after {
    content: "";
    position: absolute;
    bottom: -13px;
    left: -6px;
    width: 80px;
    height: 13px;
    background: #ffd700;
    box-shadow: -3px 0px 0px #e8960a, inset 0px 3px 0px #d49100;
    z-index: 2;
    border-radius: 2px;
}

#cupholder:before {
    content: "";
    position: absolute;
    bottom: 20px;
    left: 22px;
    width: 22px;
    height: 22px;
    background: #ffd700;
    box-shadow: inset 4px -2px 0px #e8960a;
    border-radius: 50%;
}

#cupholderleft,
#cupholderright {
    position: absolute;
    width: 30px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    top: 11px;
    z-index: -1;
}

#cupholderleft {
    left: 2px;
    box-shadow: inset 0px 0px 0px 5px #f0a500;
    transform: rotate(-30deg);
}

#cupholderright {
    right: 5px;
    box-shadow: inset 0px 0px 0px 5px #ffd700;
    transform: rotate(30deg);
}

#cupholderleft:after {
    position: absolute;
    content: "";
    left: 20px;
    top: 9px;
    width: 14px;
    height: 14px;
    background: #16213e;
    transform: rotate(30deg);
    box-shadow: inset 0px 5px 0px #f0a500;
}

#cupholderright:after {
    position: absolute;
    content: "";
    right: 20px;
    top: 9px;
    width: 14px;
    height: 14px;
    background: #16213e;
    transform: rotate(-30deg);
    box-shadow: inset 0px 5px 0px #ffd700;
}

#shinemark {
    position: absolute;
    height: 32px;
    width: 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    right: 7px;
    top: 18px;
}

#shinemark:after {
    position: absolute;
    content: "";
    right: 0px;
    bottom: -9px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

#tringle {
    content: "";
    width: 22px;
    height: 22px;
    transform: rotate(45deg);
    background: #ffd700;
    left: 51px;
    bottom: -52px;
    position: absolute;
    box-shadow: inset 0px 5px 0px #f0a500, inset 3px 0px 0px #e8960a;
    z-index: -2;
}

.section-achievements .big-text {
    font-size: 34px;
    font-weight: 300;
    color: #fff;
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.section-achievements .big-text .highlight {
    color: #e94560;
    font-weight: 800;
    font-size: 42px;
    border-bottom: 4px solid #e94560;
    padding-bottom: 4px;
}

/* ===== РУБРИКИ ===== */
.rubrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.rubric-card {
    background: #ffffff;
    padding: 28px 20px 24px;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: #1a1a2e;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #1a1a2e;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

.rubric-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    border-color: #e94560;
    background: #fafafa;
}

.rubric-card .icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a2e;
    transition: all 0.3s;
}

.rubric-card:hover .icon {
    color: #e94560;
    transform: scale(1.1);
}

.rubric-card .name {
    font-size: 20px;
    font-weight: 600;
}

.rubric-card:nth-child(1) { border-top-color: #e94560; border-top-width: 5px; }
.rubric-card:nth-child(2) { border-top-color: #3498db; border-top-width: 5px; }
.rubric-card:nth-child(3) { border-top-color: #2ecc71; border-top-width: 5px; }
.rubric-card:nth-child(4) { border-top-color: #f39c12; border-top-width: 5px; }
.rubric-card:nth-child(5) { border-top-color: #9b59b6; border-top-width: 5px; }
.rubric-card:nth-child(6) { border-top-color: #1abc9c; border-top-width: 5px; }

/* ===== КНОПКА НАВЕРХ ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: #e94560;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.45);
}

/* ===== ПОДВАЛ ===== */
.footer {
    background: #1a1a2e;
    color: #b2bec3;
    text-align: center;
    padding: 28px 20px;
    font-size: 14px;
    border-top: 3px solid #e94560;
}

/* ===== ИКОНКИ ===== */
.planet-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planet-icon .planet-core {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a3c8f 0%, #2196f3 40%, #1a3c8f 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(33, 150, 243, 0.5), inset -4px -3px 8px rgba(0, 0, 0, 0.3);
}

.planet-icon .planet-core::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 6px;
    width: 10px;
    height: 8px;
    background: #4caf50;
    border-radius: 50% 60% 40% 50%;
    box-shadow: 14px 12px 0 -1px #4caf50, -2px 18px 0 0 #4caf50, 12px 22px 0 -2px #66bb6a;
}

.planet-icon .planet-core::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -2px;
    width: 40px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

.planet-icon .planet-ring {
    position: absolute;
    width: 46px;
    height: 10px;
    border: 1.5px solid rgba(230, 235, 252, 0.7);
    border-radius: 50%;
    transform: rotate(-20deg);
    top: 50%;
    left: 50%;
    margin: -5px 0 0 -23px;
}

.quiz-medal {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-medal__circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #f0a500 50%, #e8960a 100%);
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-medal__circle span {
    font-size: 14px;
    font-weight: 900;
    color: #fff;
}

.quiz-medal__ribbon {
    position: absolute;
    bottom: 0;
    width: 13px;
    height: 20px;
    z-index: 1;
    background: linear-gradient(180deg, #e94560 0%, #c0392b 100%);
}

.quiz-medal__ribbon--left {
    left: 8px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
    transform: rotate(12deg);
}

.quiz-medal__ribbon--right {
    right: 8px;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
    transform: rotate(-12deg);
}

.book-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-icon .book-stack {
    position: relative;
    width: 26px;
    height: 24px;
}

.book-icon .book-one,
.book-icon .book-two,
.book-icon .book-three {
    position: absolute;
    border-radius: 3px;
}

.book-icon .book-one {
    bottom: 0;
    left: 0;
    width: 26px;
    height: 7px;
    background: linear-gradient(135deg, #e94560, #c0392b);
}

.book-icon .book-two {
    bottom: 8px;
    left: 3px;
    width: 20px;
    height: 7px;
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.book-icon .book-three {
    bottom: 16px;
    left: 0;
    width: 26px;
    height: 7px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.student-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.student-icon .head {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbd099, #f2c38f);
    position: relative;
    z-index: 2;
}

.student-icon .head::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -1px;
    width: 24px;
    height: 12px;
    background: #6b3815;
    border-radius: 50% 50% 30% 30%;
    z-index: 3;
}

.student-icon .eyes {
    position: absolute;
    top: 8px;
    left: 4px;
    width: 14px;
    height: 6px;
    z-index: 4;
}

.student-icon .eye {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #1a1a2e;
    border-radius: 50%;
    top: 0;
}

.student-icon .eye-left { left: 0; }
.student-icon .eye-right { right: 0; }

.student-icon .glasses {
    position: absolute;
    top: 6px;
    left: 2px;
    width: 18px;
    height: 9px;
    z-index: 5;
}

.student-icon .glasses-frame {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1.5px solid #4f260b;
    border-radius: 2px;
    top: 0;
}

.student-icon .glasses-left { left: 0; }
.student-icon .glasses-right { right: 0; }

.student-icon .glasses-bridge {
    position: absolute;
    top: 3px;
    left: 8px;
    width: 2px;
    height: 1.5px;
    background: #4f260b;
}

.student-icon .body {
    width: 30px;
    height: 22px;
    background: linear-gradient(180deg, #1a1a2e, #16213e);
    border-radius: 0 0 8px 8px;
    position: relative;
    margin-top: 2px;
}

.student-icon .body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #e94560;
}

.student-icon .body::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 7px;
    width: 16px;
    height: 10px;
    background: #fff;
    border-radius: 2px;
}

.notepad-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notepad-icon .pad {
    width: 26px;
    height: 30px;
    background: #fff;
    border: 2px solid #1a1a2e;
    border-radius: 3px;
    position: relative;
}

.notepad-icon .pad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 100%;
    background: #e94560;
    border-radius: 2px 0 0 2px;
}

.notepad-icon .pad::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 4px;
    width: 12px;
    height: 2px;
    background: #e0e0e0;
    box-shadow: 0 5px 0 #e0e0e0, 0 10px 0 #e0e0e0, 0 15px 0 #e0e0e0;
}

.notepad-icon .pencil {
    position: absolute;
    bottom: -2px;
    right: 2px;
    width: 14px;
    height: 3px;
    background: linear-gradient(90deg, #e67e22 60%, #ffe0a7 60%);
    border-radius: 1px;
    transform: rotate(-35deg);
}

.portfolio-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-icon .case {
    width: 28px;
    height: 22px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-radius: 4px;
    position: relative;
}

.portfolio-icon .case::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 5px;
    width: 10px;
    height: 5px;
    background: #1a1a2e;
    border-radius: 3px 3px 0 0;
}

.portfolio-icon .lock {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #ffd700;
    border-radius: 2px;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 992px) {
    .books-grid,
    .rubrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-grid {
        flex-direction: column;
        text-align: center;
    }
    .section-welcome,
    .section-about,
    .section-books,
    .section-achievements,
    .section-rubrics {
        margin: 15px;
        padding: 40px 25px;
        border-radius: 20px;
    }
    .header-inner {
        justify-content: center;
        gap: 15px;
    }
    .nav {
        gap: 20px;
    }
    .logo {
        margin-left: 0;
    }
    .contact-btn {
        margin-right: 0;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 10px 0;
    }
    .header-inner {
        gap: 8px;
        padding: 0 10px;
    }
    .logo {
        width: 40px;
        height: 40px;
    }
    .logo img {
        width: 40px !important;
    }
    .nav {
        gap: 10px;
    }
    .nav a {
        font-size: 12px;
    }
    .contact-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .books-grid,
    .rubrics-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
    .section-welcome,
    .section-about,
    .section-books,
    .section-achievements,
    .section-rubrics {
        margin: 10px;
        padding: 30px 15px;
        border-radius: 16px;
    }
    .section-welcome .text {
        font-size: 18px;
        text-align: left;
    }
    .quote-block {
        font-size: 18px;
        padding: 20px;
    }
    .about-img {
        width: 180px;
        height: 180px;
    }
    
    .trophy-wrapper {
        min-height: 100px;
        overflow: hidden;
    }
    #goldcup {
        width: 110px;
        transform: scale(0.55);
        transform-origin: center center;
        margin: 0 auto;
        animation: none;
    }
    .section-achievements .big-text {
        font-size: 20px;
    }
    .section-achievements .big-text .highlight {
        font-size: 24px;
    }
}