* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'STKaiti', 'KaiTi', 'SimKai', serif;
}

.pages-container {
    width: 100%;
    height: 100%;
    position: relative;
    background-color: #F5F0E6;
}

.page {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: none;
    overflow-y: auto;
}

.page.active {
    display: block;
}

.bamboo-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('062af83c31f205beb244293c35f7fe94.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.page-content {
    position: relative;
    z-index: 1;
    padding: 30px 20px;
    min-height: 100%;
    background-color: rgba(245, 240, 230, 0.95);
}

.title-section {
    text-align: center;
    margin-bottom: 40px;
}

.main-title {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.seal {
    display: inline-block;
    padding: 8px 16px;
    background-color: #C73E3A;
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    font-size: 18px;
    color: #666;
    letter-spacing: 2px;
}

.tea-icons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.tea-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tea-icon img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #D4AF37;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tea-icon span {
    font-size: 14px;
    color: #555;
}

.poem {
    text-align: center;
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
    padding: 0 20px;
    font-style: italic;
}

.page-title {
    background-color: #E8F5E9;
    color: #2E7D32;
    padding: 12px 24px;
    border-radius: 20px;
    text-align: center;
    font-size: 22px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-subtitle {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-bottom: 25px;
    font-family: 'Times New Roman', serif;
}

.text-content {
    text-align: center;
    font-size: 17px;
    color: #444;
    line-height: 2.2;
    margin-bottom: 40px;
    padding: 0 15px;
}

.text-content p {
    margin: 5px 0;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    margin-top: 20px;
}

.nav-btn {
    padding: 12px 28px;
    font-size: 16px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #8B7355 0%, #6B5344 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139, 115, 85, 0.3);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 115, 85, 0.4);
}

.next-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.history-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.timeline {
    padding: 0 10px;
}

.timeline-item {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-left: 4px solid #D4AF37;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.time-period {
    font-weight: bold;
    color: #8B4513;
    font-size: 16px;
}

.time-range {
    color: #999;
    font-size: 14px;
    margin-left: 8px;
}

.timeline-item p {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.illustration {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 10px;
}

.illustration img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.tea-methods {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 30px;
}

.method-section {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.method-section h3 {
    color: #8B4513;
    font-size: 18px;
    margin-bottom: 15px;
    text-align: center;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background-color: #FDF8E8;
    border-radius: 8px;
    min-width: 70px;
}

.step-num {
    width: 28px;
    height: 28px;
    background-color: #D4AF37;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.step-text {
    font-size: 13px;
    color: #555;
}

.tea-ceremony {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.ceremony-item {
    display: flex;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.ceremony-img {
    flex-shrink: 0;
}

.ceremony-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #D4AF37;
}

.ceremony-text h3 {
    color: #8B4513;
    font-size: 16px;
    margin-bottom: 8px;
}

.ceremony-text p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.carousel-container {
    position: relative;
    margin-bottom: 30px;
    padding: 0 10px;
}

.carousel {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #D4AF37;
    transform: scale(1.2);
}

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.8);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-prev:hover, .carousel-next:hover {
    background-color: #D4AF37;
    color: #fff;
}

.tea-character {
    text-align: center;
    font-size: 120px;
    color: #D4AF37;
    font-weight: bold;
    text-shadow: 4px 4px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.logo {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #8B7355;
    margin-bottom: 15px;
}

.canvas-area {
    position: relative;
    background-color: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#drawingCanvas {
    width: 100%;
    height: 200px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: crosshair;
}

.canvas-tools {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.tool-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
    border: none;
    border-radius: 50%;
    background-color: #E3F2FD;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    transform: scale(1.1);
    background-color: #BBDEFB;
}

.canvas-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.action-btn {
    padding: 10px 30px;
    font-size: 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cancelBtn {
    background-color: #E57373;
    color: #fff;
}

#finishBtn {
    background-color: #66BB6A;
    color: #fff;
}

.special-btn {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    border-radius: 25px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.toast.show {
    opacity: 1;
}

@media screen and (min-width: 768px) {
    .page-content {
        max-width: 600px;
        margin: 0 auto;
        min-height: 100vh;
    }
}
