* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top, rgba(255,170,70,0.10), transparent 25%),
        #090b10;
    color: #f4f4f4;
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    backdrop-filter: blur(10px);
    background: rgba(12, 14, 20, 0.84);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.top-nav a {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.04);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    font-size: 18px;
}

.page-wrap {
    width: min(1100px, calc(100% - 28px));
    margin: 24px auto 40px;
}

.page-wrap.narrow {
    width: min(560px, calc(100% - 28px));
}

.hero-card,
.content-card {
    background: linear-gradient(180deg, rgba(30,33,40,0.96), rgba(21,23,29,0.96));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 28px;
    box-shadow:
        0 12px 40px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.03);
    padding: 24px;
}

.login-card {
    margin-top: 60px;
}

.hero-card {
    text-align: center;
    margin-bottom: 20px;
}

.logo-badge {
    width: 86px;
    height: 86px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 28px;
    color: #161616;
    background: linear-gradient(135deg, #f7d55d, #ff8a47);
    box-shadow: 0 0 30px rgba(255,168,78,0.2);
}

.logo-section {
    text-align: center;
    margin-top: 8px;
    margin-bottom: 18px;
}

.main-logo {
    width: min(280px, 70vw);
    height: auto;
    opacity: 0.96;
    filter: drop-shadow(0 8px 18px rgba(255, 155, 70, 0.18));
}

.hero-title {
    margin: 0 0 8px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.05;
}

.hero-subtitle {
    margin: 0;
    color: #c7cad1;
    font-size: 16px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.menu-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(34,37,45,1), rgba(25,27,34,1));
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow:
        0 8px 24px rgba(0,0,0,0.26),
        inset 0 0 0 1px rgba(255,255,255,0.02);
}

.menu-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f7d55d, #ff8a47);
    color: #111;
    font-size: 24px;
    flex-shrink: 0;
}

.menu-card strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.menu-card small {
    color: #b7bcc6;
    font-size: 14px;
}

.form-stack {
    display: grid;
    gap: 12px;
}

label {
    font-size: 14px;
    color: #d4d7dc;
}

input[type="text"],
textarea,
select {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #fff;
    border-radius: 18px;
    padding: 14px 16px;
    font-size: 16px;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-primary,
.btn-secondary,
.inline-btn,
.btn-rating {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 0;
    border-radius: 999px;
    padding: 15px 20px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: #141414;
    font-weight: 700;
    background: linear-gradient(90deg, #d8c35a, #c56a45);
    box-shadow: 0 8px 24px rgba(197,106,69,0.2);
}

.btn-secondary,
.inline-btn {
    color: #fff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
}

.notice {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 15px;
}

.notice.success {
    background: rgba(87, 189, 117, 0.12);
    border: 1px solid rgba(87, 189, 117, 0.25);
}

.notice.error {
    background: rgba(210, 93, 93, 0.12);
    border: 1px solid rgba(210, 93, 93, 0.25);
}

.flashcard,
.quiz-question,
.quiz-option,
.result-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 22px;
}

.flashcard {
    padding: 18px;
    margin-bottom: 16px;
}

.single-card {
    max-width: 800px;
    margin-inline: auto;
}

.card-category {
    display: inline-block;
    margin-bottom: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: #efc86a;
    border: 1px solid rgba(239,200,106,0.25);
    background: linear-gradient(90deg, rgba(216,195,90,0.12), rgba(197,106,69,0.08));
}

.status-pill {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #cfd5df;
    background: rgba(255,255,255,0.05);
}

.autor-info {
    font-size:13px;
    color:#9aa3b2;
    margin-bottom:10px;
}

.card-question,
.card-answer,
.quiz-question {
    font-size: 20px;
    line-height: 1.45;
    margin-bottom: 16px;
}

.card-answer {
    margin-top: 14px;
    color: #d9dde4;
}

.rating-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 14px;
}

.btn-rating.good {
    background: rgba(87, 189, 117, 0.18);
    color: #dff3e5;
    border: 1px solid rgba(87, 189, 117, 0.25);
}

.btn-rating.medium {
    background: rgba(230, 183, 74, 0.18);
    color: #fff0c9;
    border: 1px solid rgba(230, 183, 74, 0.25);
}

.btn-rating.bad {
    background: rgba(210, 93, 93, 0.18);
    color: #ffdada;
    border: 1px solid rgba(210, 93, 93, 0.25);
}

.quiz-form {
    display: grid;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
}

.quiz-option input {
    transform: scale(1.15);
    accent-color: #f0c35f;
}

.quiz-topbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: #d6dbe4;
    font-size: 15px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
    margin-bottom: 18px;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d8c35a, #c56a45);
}

.result-box {
    text-align: center;
    padding: 24px;
    margin-top: 14px;
}

.result-score {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 8px;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mt-20 {
    margin-top: 20px;
}

.mode-switch-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.mode-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    color: #dfe4ec;
    font-size: 14px;
    transition: 0.2s ease;
}

.mode-switch.active {
    background: linear-gradient(90deg, #d8c35a, #c56a45);
    color: #171717;
    font-weight: 700;
    border-color: transparent;
}

.mode-info {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
    color: #cfd5df;
    line-height: 1.5;
    font-size: 14px;
}

@media (min-width: 760px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .rating-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1100px) {
    .menu-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}