* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #5C9C95;
    overflow: hidden;
    color: #f8fbff;
}

.page {
    display: none;
    width: 100vw;
    height: 100vh;
    background: #5C9C95;
    position: relative;
    overflow-y: auto;
}

.page.active {
    display: block;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #346a72;
    padding: 20px 60px;
    z-index: 100;
    border-bottom: none;
    gap: 40px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
    flex: 1;
}

.logo {
    font-family: 'Chelsea Market', cursive;
    font-size: 64px;
    font-weight: normal;
    color: #f8fbff;
    line-height: 1.1;
    white-space: nowrap;
}

.header-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 60px;
}

.progress-title {
    font-size: 36px;
    font-weight: 400;
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
}

.progress-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    height: 50px;
}

.progress-track {
    position: relative;
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
}

.progress-line {
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    flex: 1;
}

.progress-pin {
    position: absolute;
    left: calc(0% - 15px);
    top: -8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-pin img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.xp-labels {
    display: flex;
    justify-content: space-between;
    position: absolute;
    width: 100%;
    top: 25px;
    left: 0;
    padding: 0 10px;
}

.xp-text {
    font-size: 15px;
    color: #ffffff;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
}

/* Navigation buttons in header */
.nav-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-btn {
    padding: 18px 35px;
    background: #f4f4ff;
    color: #0c4c4e;
    border: none;
    border-radius: 24px;
    font-family: 'Roboto', sans-serif;
    font-size: 36px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #ffffff;
}

.nav-btn:active {
    transform: translateY(0);
}

/* Main content */
.content {
    display: flex;
    gap: 40px;
    padding: 40px 60px;
    align-items: stretch;
}

.left-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.right-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5c9c96;
    border-radius: 39px;
    padding: 0;
    overflow: hidden;
    border: 10px solid #2F715A;
}

.right-section img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 29px;
}

.title {
    font-family: 'Chelsea Market', cursive;
    font-size: 56px;
    font-weight: normal;
    color: #f8fbff;
    margin-bottom: 30px;
    line-height: 1.2;
}

.description {
    font-size: 36px;
    color: #f8fbff;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
}

.cta-button {
    display: inline-block;
    padding: 25px 50px;
    background: #346a72;
    color: #f8fbff;
    border: none;
    border-radius: 22px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 70px;
    font-weight: 500;
    cursor: pointer;
    width: fit-content;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: rgba(248, 251, 255, 0.5);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 39px;
}

/* Tutorial cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 0 60px 60px;
}

.card {
    background: #346a72;
    border-radius: 41px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.card-image {
    width: 100%;
    aspect-ratio: 1;
    background: #5c9c96;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-title {
    font-family: 'Roboto Mono', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #f8fbff;
    margin-bottom: 15px;
}

.card-xp {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    color: #f8fbff;
    font-weight: 500;
}

.card-time {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    color: #f8fbff;
    margin-top: 10px;
    font-weight: 500;
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(248, 251, 255, 0.3), transparent);
    margin: 30px 60px;
}

.difficulty-legend {
    display: flex;
    gap: 80px;
    margin: 40px 60px;
    padding: 0;
}

.difficulty-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.difficulty-icon {
    font-size: 24px;
    width: 32px;
    height: auto;
    background: none;
    border-radius: 0;
    display: inline-block;
}

.difficulty-label {
    font-family: 'Roboto Mono', monospace;
    font-size: 40px;
    font-weight: 500;
    color: #f8fbff;
}

/* Navigation buttons at bottom */
.page-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 60px;
    border-top: none;
}

.page-nav-btn {
    padding: 15px 40px;
    background: #346a72;
    color: #f8fbff;
    border: none;
    border-radius: 22px;
    font-family: 'Roboto', sans-serif;
    font-size: 28px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.page-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-counter {
    display: none;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    color: rgba(248, 251, 255, 0.7);
    font-weight: 400;
}

/* Quiz styles */
.quiz-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 60px;
}

.quiz-intro {
    font-size: 64px;
    color: #f8fbff;
    margin-bottom: 50px;
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
}

.quiz-question {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    font-weight: 500;
    color: #f8fbff;
    margin-bottom: 40px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.quiz-option {
    padding: 20px;
    background: #346a72;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 40px;
    color: #f8fbff;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: #d2d534;
    background: #5c9c96;
}

/* Quote section */
.quote-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px;
}

.quote {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    font-style: normal;
    color: #f8fbff;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 500;
}

.quote-author {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    color: #f8fbff;
    font-weight: 500;
}

/* Keyboard hint */
.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: rgba(248, 251, 255, 0.6);
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    z-index: 1000;
}

/* Comparison section */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.comparison-item {
    background: #346a72;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
}

.comparison-title {
    font-family: 'Roboto', sans-serif;
    font-size: 64px;
    font-weight: 500;
    color: #f8fbff;
    margin-bottom: 20px;
}

.comparison-image {
    width: 100%;
    height: 200px;
    background: #5c9c96;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.comparison-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.recommended-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recommended-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.recommended-content h3 {
    font-family: 'Roboto Mono', monospace;
    font-size: 48px;
    font-weight: 700;
    color: #f8fbff;
    margin-bottom: 10px;
}

.recommended-content p {
    font-family: 'Roboto Mono', monospace;
    font-size: 48px;
    font-weight: 700;
    color: #f8fbff;
    margin-bottom: 30px;
}

.recommended-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
}

.xp-badge {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    font-weight: 500;
    color: #f8fbff;
    margin-top: 20px;
}

.time-badge {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    color: #f8fbff;
    margin-top: 10px;
    font-weight: 500;
}

/* Results page styles */
.results-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 60px;
    gap: 30px;
}

.score-display {
    font-size: 96px;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #d2d534;
    margin: 20px 0;
}

.achievement-text {
    font-size: 56px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #f8fbff;
    margin: 30px 0;
}

.certificate-button {
    padding: 25px 50px;
    background: #d2d534;
    color: #0c4c4e;
    border: none;
    border-radius: 22px;
    font-family: 'Roboto', sans-serif;
    font-size: 36px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.certificate-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Certificate page styles */
.certificate-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    height: 100%;
}

.certificate {
    background: #f8fbff;
    border: 8px solid #346a72;
    border-radius: 20px;
    padding: 80px;
    text-align: center;
    max-width: 900px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.certificate-title {
    font-family: 'Chelsea Market', cursive;
    font-size: 64px;
    color: #346a72;
    margin-bottom: 40px;
}

.certificate-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 32px;
    color: #0c4c4e;
    font-weight: 500;
    margin-bottom: 30px;
}

.certificate-name {
    font-family: 'Roboto', sans-serif;
    font-size: 48px;
    color: #0c4c4e;
    font-weight: 700;
    margin: 40px 0;
    text-decoration: underline;
}

.certificate-details {
    font-family: 'Roboto Mono', monospace;
    font-size: 24px;
    color: #0c4c4e;
    margin: 30px 0;
    line-height: 1.8;
}

.certificate-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.cert-button {
    padding: 18px 35px;
    background: #346a72;
    color: #f8fbff;
    border: none;
    border-radius: 22px;
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.cert-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Unlocked Resources styles */
.unlocked-container {
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.unlocked-header {
    text-align: center;
    margin: 20px 0;
}

.unlocked-title {
    font-family: 'Chelsea Market', cursive;
    font-size: 72px;
    color: #f8fbff;
    margin-bottom: 20px;
}

.unlocked-description {
    font-size: 36px;
    color: #f8fbff;
    font-weight: 500;
}

@keyframes correctPulse {
    0% { background-color: rgba(255, 255, 255, 1); }
    50% { background-color: #30ff7c; }
    100% { background-color: #30ff7c; }
}

@keyframes incorrectPulse {
    0% { background-color: rgba(255, 255, 255, 1); }
    50% { background-color: #ff6b6b; }
    100% { background-color: #ff6b6b; }
}

@keyframes slideInPencil {
    from {
        left: -15px;
        opacity: 0;
    }
    to {
        left: calc(100% - 15px);
        opacity: 1;
    }
}
