body {
    background: linear-gradient(135deg, #c3ecff, #fceabb);
	font-family: sans-serif;
}

/* карточки */
.card {
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border: none;
}

/* прогресс бар */
.progress {
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #6a11cb, #2575fc);
}

/* достижения */
.card h5 {
    font-size: 18px;
}


/* название */
.achievement-title {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 18px;
}

/* заблокировано */
.achievement-badge.locked {
    opacity: 1;
}


.avatar-option input {
    display: none;
}

.avatar-img {
    display: inline-block;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid transparent;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: 0.2s;
}

/* 🔥 ВСЕГДА работает */
.avatar-option input:checked + .avatar-img {
    border: 3px solid blue;
}

/* контейнер страницы */
.container {
    max-width: 1000px;
    margin: 0 auto;
}


/* блоки */
.section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* прогресс */
.progress {
    height: 14px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.3);
}

.progress-bar {
    background: linear-gradient(90deg, #ffd700, #ffb700);
}

/* === HERO === */
.profile-hero {
    position: relative;
    background: linear-gradient(180deg, #61bc43, #48af44);
    border-radius: 25px;
    overflow: hidden;
    color: white;
    margin-bottom: 30px;
	font-family: 'Rubik', sans-serif;
	will-change: transform;
	box-shadow: inset 0 -6px 15px rgba(0,0,0,0.15);
}


.avatar-big {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
}

/* текст */
.profile-info h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 800;
}

.rank {
    font-size: 18px;
    opacity: 0.95;
	margin: 4px 0;
    font-size: 18px;
	font-weight: 400;
}

.stars {
    font-size: 18px;
    margin: 4px 0;
	color: white;
	font-weight: 400;
}

/* кнопка */
.btn-change {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 22px;

    border-radius: 25px;

    background: #3faa3c;        /* сплошной цвет */
    color: white;

    border: 2px solid #ffffff;  /* белая рамка */

    font-weight: 400;
    text-decoration: none;

    box-shadow: 0 4px 0 #2e7d32; /* глубина */
    transition: 0.2s;
}

.btn-change:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #2e7d32;
    border-color: #ffffff; /* рамка становится ярче */
}

.progress-card {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
	
}

.level-badge {
    display: inline-block;
    padding: 10px 20px;

    color: white;
    font-weight: 800;
    font-size: 18px;

    background: linear-gradient(180deg, #5fdc4f, #3faa3c);

    border-radius: 12px;
    border: 2px solid #2e7d32;

    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.3),
        0 4px 0 #2e7d32;

    position: relative;
}

.progress-bar-wrap {
    background: #ddd;
    border-radius: 20px;
    height: 22px;
    overflow: visible;
    position: relative;
	border: 2px solid rgba(0,0,0,0.95);
	
}

.progress-bar-fill {
    background: linear-gradient(90deg, #FFD54F, #FFA000);
    height: 100%;
    border-radius: 20px;

    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.2);
	position: relative;
	overflow: visible;
}

.achievements {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}


.achievement-card.locked img {
    filter: grayscale(100%);
}

.progress-bar-fill {
    background: linear-gradient(90deg, #FFD54F, #FFA000);
    height: 100%;
    transition: width 0.5s ease;
}

.ok {
    color: #4CAF50;
    font-weight: bold;
}

.no {
    color: #f44336;
    font-weight: bold;
}


.achievement-card:hover {
    transform: translateY(-5px);
}

.tooltip-box {
    display: none;

    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);

    width: 260px;
    max-height: 200px;

    background: white;
    color: #333;

    padding: 12px;
    padding-top: 1px;

    border-radius: 15px;

    font-size: 13px;
    text-align: left;

    box-shadow: 0 8px 20px rgba(0,0,0,0.2);

    z-index: 100;

    white-space: pre-line;     /* переносы строк */
    word-break: break-word;    /* длинные слова */
    overflow-y: auto;          /* вертикальный скролл */
    overflow-x: hidden;        /* запрет горизонтального */
}

/* показать */
.achievement-card.active .tooltip-box {
    display: block;
}

/* крестик */
.tooltip-close {
    position: absolute;
    top: 5px;
    right: 8px;
    cursor: pointer;
}

.tooltip-close:hover {
    color: red;
}

.page-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 20px;
	letter-spacing: 1px;
}

.profile-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.rank span {
    font-weight: 600;
}

.stars {
    font-size: 18px;
    margin: 5px 0;
    color: white; /* БАЗОВЫЙ цвет */
}

.hero-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
    vertical-align: middle;
}

/* 🎓 шляпа */
.icon.hat {
    fill: #e8f5e9; /* мягкий светлый */
}

/* ⭐ звезда */
.icon.star {
    fill: #fee32e;
	width: 28px;
    height: 28px;
	position: relative;
    left: 5px;
}

.hero-title-bar {
    background: #39a540;
    text-align: center;
    padding: 14px 0;
    font-weight: 800;
    font-size: 28px;
	position: relative;
    z-index: 1;
	letter-spacing: 0.5px;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 25px;
	position: relative;
    z-index: 1;
	justify-content: center;
	width: fit-content;   /* КЛЮЧЕВОЕ */
    margin: 0 auto;   
}

.stars-count {
    color: #fee32e;
    font-weight: 700;
}

.stars-label {
    color: white !important; /* принудительно */
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.hero-wave svg {
    width: 100%;
    height: 100%;
}

.hero-wave path {
    fill: #39a540; /* твой тёмный цвет */
}

.profile-info h2 {
    font-weight: 800;
    font-size: 28px;
	margin: 0;
}

.profile-info {
    line-height: 1.2;   /* компактнее */
}

.btn-change:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #2e7d32;
}

.level-badge::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 10%;
    width: 80%;
    height: 4px;

    background: rgba(255,255,255,0.4);
    border-radius: 2px;
}

.progress-text {
    margin: 8px 0 12px;
    line-height: 1.2;
}

.stars-big {
    color: #2e7d32;

    font-size: 24px;        /* было 28 → уменьшаем */
    font-weight: 800;

    letter-spacing: -0.5px; /* убираем разъезд */
    
    transform: scaleX(0.9); /* сжимаем по ширине */
    display: inline-block;

    line-height: 1;
}

.stars-small {
    font-size: 18px;     /* было 16 → увеличиваем */
	color: #333f44;
    
    font-weight: 300;    /* добавляем веса */
    
    margin-left: 6px;
}

.progress-cap {
    position: absolute;
    top: -18px;
    width: 40px;
    height: 40px;
    transform: translateX(-50%);
}



.level-badge-hex {
    display: inline-block;
    padding: 6px; /* толщина рамки */

    background: linear-gradient(180deg, #74c237, #4ea338);

    /* ВЕРТИКАЛЬНЫЙ шестиугольник */
    clip-path: polygon(
        50% 0%,
        90% 20%,
        90% 80%,
        50% 100%,
        10% 80%,
        10% 20%
    );

    /* мягкое скругление + объём */
	filter: drop-shadow(0 6px 8px rgba(0,0,0,0.25));
}

.level-inner {
    padding: 12px 28px;

    background: linear-gradient(180deg, #5da930, #0f6321);

    color: white;
    font-weight: 900;
    font-size: 18px;

    text-align: center;

    clip-path: inherit;
    position: relative;

    /* ГЛАВНЫЙ объём */
    box-shadow:
        inset 0 3px 6px rgba(255,255,255,0.25), /* верхний свет */
        inset 0 -6px 0 #4a8f22;                /* нижняя глубина */
}

.level-inner::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 10%;
    width: 80%;
    height: 4px;

    background: rgba(255,255,255,0.25);
    border-radius: 2px;
}

.level-badge-hex,
.level-inner {
    border-radius: 14px; /* сглаживает углы визуально */
}

.progress-hat {
    position: absolute;

    right: 0;            /* ПРИВЯЗКА к концу прогресса */
    top: 50%;

    transform: translate(50%, -50%);  /* ВЫНОС за край */

    height: 45px;       /* нормальный размер */
    width: auto;

    z-index: 5;
    pointer-events: none;
}

.progress-hat svg {
    height: 100%;
    width: auto;
    display: block;
}

.progress-block {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;

    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.topics-title {
    margin-top: 24px;
    padding-top: 18px;

    border-top: 2px solid #e9ecef;

    font-weight: 700;
    color: #444;
}

.program-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.program-icon {
    width: 50px;
    height: 50px;

    flex-shrink: 0;
}

.trophy-icon {
    width: 50px;
    height: 50px;
    vertical-align: middle;

    position: relative;
    top: -5px;
}

.achievements {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* КАРТОЧКА */
.achievement-card {
    width: 140px;
    height: 140px;

    border-radius: 18px;

    overflow: visible;

    background: white;

    box-shadow: 0 6px 18px rgba(0,0,0,0.08);

    transition: 0.2s;

    position: relative;

    cursor: pointer;

    display: flex;
    flex-direction: column;
    z-index: 1;
}

/* верх */
.achievement-top {
    height: 60%;

    background: linear-gradient(180deg, #61bc43, #48af44);

    display: flex;
    align-items: center;
    justify-content: center;
	overflow: hidden;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}

/* круг под картинку */
.achievement-icon-wrap {
    width: 115px;
    height: 115px;

    border-radius: 50%;

    background: white;

    border: 5px solid rgba(255,255,255,0.95);

    overflow: hidden;

    box-shadow:
        0 6px 14px rgba(0,0,0,0.25),
        inset 0 2px 4px rgba(255,255,255,0.5);

    position: relative;

    top: 18px;

    z-index: 3;
}

/* картинка */
.achievement-icon-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* полоска со звёздами */
.achievement-reward {
    height: 20%;

    background:
        linear-gradient(
            180deg,
            #7ed12b 0%,
            #69b818 45%,
            #4f9710 100%
        );

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 800;
    font-size: 15px;

    color: white;

    position: relative;

    text-shadow: 0 1px 2px rgba(0,0,0,0.25);

    border-top: 2px solid rgba(255,255,255,0.25);

    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.18),
        inset 0 -3px 0 rgba(0,0,0,0.08);
}

.achievement-reward::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        repeating-linear-gradient(
            -45deg,
            rgba(255,255,255,0.08) 0px,
            rgba(255,255,255,0.08) 8px,
            transparent 8px,
            transparent 16px
        );

    opacity: 0.7;

    pointer-events: none;
}

.achievement-reward::before {
    content: "";

    position: absolute;

    top: 2px;
    left: 8%;

    width: 84%;
    height: 35%;

    border-radius: 999px;

    background: rgba(255,255,255,0.18);
}

/* низ */
.achievement-bottom {
    height: 20%;

    background:
        linear-gradient(
            180deg,
            #61bc43 0%,
            #48af44 100%
        );

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 8px;

    text-align: center;

    font-size: 12px;
    font-weight: 700;

    color: white;

    line-height: 1;

    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;

    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.15);
}

.tooltip-box p {
    margin: 0;
}

.achievement-card.active .tooltip-box {
    display: block;
}

.tooltip-box * {
    margin-top: 0 !important;
}

.achievement-card.locked .achievement-top,
.achievement-card.locked .achievement-icon-wrap img {
    filter: grayscale(1);
}

.achievement-card.locked .achievement-reward {
    background:
        linear-gradient(
            180deg,
            #6e6e6e 0%,
            #4f4f4f 100%
        );

    color: #f1f1f1;
}

.achievement-card.locked .achievement-bottom {
    background:
        linear-gradient(
            180deg,
            #8c8c8c 0%,
            #6f6f6f 100%
        );

    color: #f3f3f3;
}

.reward-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.reward-star {
    width: 23px;
    height: 23px;

    flex-shrink: 0;

    filter:
        drop-shadow(0 2px 2px rgba(0,0,0,0.25));
}

/* ===== ТЕМЫ ===== */

.topics-modern {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.topic-card {
    background: rgba(255,255,255,0.75);

    border-radius: 18px;

    overflow: hidden;

    border: 2px solid rgba(0,0,0,0.05);

    box-shadow:
        0 4px 12px rgba(0,0,0,0.04);
}

/* строки */
.topic-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 14px 18px;

    position: relative;
}

.topic-row.main {
    background:
        linear-gradient(
            180deg,
            rgba(97,188,67,0.12),
            rgba(72,175,68,0.05)
        );
}

/* НЕ ПРОЙДЕНА */
.topic-card.locked .topic-row.main {
    background:
        linear-gradient(
            180deg,
            rgba(255,167,38,0.16),
            rgba(255,152,0,0.06)
        );
}

.topic-row.sub,
.topic-row.deep {
    border-top: 1px dashed rgba(0,0,0,0.08);

    background: rgba(255,255,255,0.55);
}

/* левая часть */
.topic-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* кружок */
.topic-number {
    width: 42px;
    height: 42px;

    border-radius: 50%;

    background:
        linear-gradient(
            180deg,
            #69c63f,
            #48af44
        );

    color: white;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 900;
    font-size: 20px;

    box-shadow:
        inset 0 2px 0 rgba(255,255,255,0.3),
        0 3px 6px rgba(0,0,0,0.15);
}

/* текст */
.topic-title {
    font-size: 24px;
    font-weight: 800;
    color: #34495e;
}

.topic-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: #4f5f6d;
}

.topic-title.small {
    font-size: 20px;
    font-weight: 700;

    color: #35506b;

    margin-left: 54px;
}

.topic-title.tiny {
    font-size: 18px;
    font-weight: 600;

    color: #4b5e72;

    margin-left: 88px;
}

/* правая часть */
.topic-right {
    display: flex;
    align-items: center;

    gap: 20px;

    margin-left: 30px; /* вместо auto */
    padding-right: 15px;
}

.topic-right .status {
    min-width: 22px;
    text-align: center;

    font-size: 18px;
    font-weight: 700;
}

/* статусы */
.status {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
    font-weight: 900;

    background: white;

    box-shadow:
        0 2px 8px rgba(0,0,0,0.08);
}

.status.ok {
    color: #57b532;
}

.status.no {
    color: #ef5350;
}

/* линии */
.sub-line {
    position: absolute;

    left: 38px;
    top: 0;
    bottom: 0;

    width: 2px;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(0,0,0,0.12) 0 6px,
            transparent 6px 12px
        );
}

/* зелёный кружок для пройденных/главных тем — оставляем как есть */
.topic-card .topic-number {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #61bc43;  /* зелёный для пройденных */
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

/* оранжевый для непройденных тем */
.topic-card.locked .topic-number {
    background: #f5a623;  /* оранжевый */
    color: white;
}

.topic-reward {
    display: flex;
    align-items: center;
    gap: 5px;

    padding-left: 14px;

    border-left: 1px solid rgba(0,0,0,0.12);
	font-weight: 700;
	font-size: 20px;
}

.topic-star {
    width: 25px;
    height: 25px;

    fill: #ffbf00;

    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

/* галочка */
.topic-right .status.ok {
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

/* крестик */
.topic-right .status.no {
    color: #f44336;
    border: 2px solid #f44336;
}

/* выполненная тема */
.topic-reward.done {
    color: #49a61d;
}

/* невыполненная */
.topic-reward.locked {
    color: #ff9800;
}

.achievement-card:hover,
.achievement-card.active {
    z-index: 999;
}

.btn-logout {
    display: block;
    width: 100%;

    margin-top: 10px;

    background: #3faa3c;
    box-shadow: 0 4px 0 #2e7d32;
}

.btn-logout:hover {
    box-shadow: 0 6px 0 #2e7d32;
}

.btn-logout:active {
    box-shadow: 0 2px 0 #2e7d32;
}

/* ===== LOGIN PAGE ===== */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 430px;

    background: white;

    border-radius: 28px;

    overflow: hidden;

    box-shadow:
        0 15px 40px rgba(0,0,0,0.12);

    animation: fadeIn 0.4s ease;
}

.login-top {
    background: linear-gradient(180deg, #61bc43, #48af44);

    padding: 40px 30px;

    text-align: center;

    color: white;
}

.login-icon {
    font-size: 58px;
    margin-bottom: 10px;
}

.login-top h1 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
}

.login-top p {
    margin-top: 10px;
    opacity: 0.95;
    font-size: 17px;
}

.login-form {
    padding: 35px;
}

.login-field {
    margin-bottom: 24px;
}

.login-field label {
    display: block;

    margin-bottom: 8px;

    font-weight: 700;
    color: #34495e;
}

.login-field input {
    width: 100%;

    padding: 14px 16px;

    border-radius: 14px;

    border: 2px solid #dfe6e9;

    font-size: 16px;

    transition: 0.2s;

    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;

    border-color: #61bc43;

    box-shadow:
        0 0 0 4px rgba(97,188,67,0.15);
}

.login-btn {
    width: 100%;

    padding: 14px;

    border: none;
    border-radius: 18px;

    background: linear-gradient(180deg, #61bc43, #48af44);

    color: white;

    font-size: 18px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 5px 0 #2f8c31;

    transition: 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 7px 0 #2f8c31;
}

.login-btn:active {
    transform: translateY(2px);

    box-shadow:
        0 2px 0 #2f8c31;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}