* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Almarai', sans-serif;
    background-color: #ffede2;
    color: #000;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Pages */
.page {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    flex-direction: column;
    animation: slideIn 0.3s ease-in-out;
}

.page.active {
    display: flex;
}

#page-congrats {
    position: relative;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Header Bar */
.header-bar {
    background-color: #f4cc93;
    height: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 60px;
    position: relative;
    flex-shrink: 0;
}

.page-title {
    font-family: 'Kiwi Maru', serif;
    font-size: 42px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    line-height: 1;
}

.congrats-title {
    font-family: 'Kiwi Maru', serif;
    font-size: 42px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    line-height: 1;
}

.home-button {
    background-color: #d5a057;
    border: none;
    width: 120px;
    height: 70px;
    font-family: 'Kiwi Maru', serif;
    font-size: 32px;
    color: #000;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.home-button:hover {
    background-color: #c99447;
}

/* Content */
.content {
    flex: 1;
    padding: 20px 40px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Main Page - Page 1 */
#page-1 .home-header {
    justify-content: center;
}

#page-1 .home-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#page-congrats .header-bar {
    justify-content: center;
}

#page-1 .home-content {
    justify-content: center;
    gap: 20px;
}

.material-button {
    background-color: #f4cc93;
    border: none;
    width: 500px;
    height: 70px;
    cursor: pointer;
    font-family: 'Kiwi Maru', serif;
    font-size: 42px;
    color: #000;
    position: relative;
    margin: 0 auto;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.material-button:hover {
    background-color: #e8ba7f;
}

.button-bg {
    position: absolute;
    inset: 0;
}

.button-text {
    position: relative;
    z-index: 1;
}

.steps-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
    flex-shrink: 0;
}

.step-card {
    width: 240px;
    height: 220px;
    background-color: #f4cc93;
    text-decoration: none;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    flex-shrink: 0;
}

.step-card:hover {
    background-color: #e8ba7f;
}

.step-card-bg {
    position: absolute;
    inset: 0;
}

.step-title {
    font-family: 'Kiwi Maru', serif;
    font-size: 40px;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
}

.step-subtitle {
    font-family: 'Almarai', sans-serif;
    font-size: 28px;
    position: relative;
    z-index: 1;
}

/* Step Pages */
.description {
    font-size: 20px;
    margin-bottom: 10px;
    max-width: 1075px;
    line-height: 1.3;
}

.footer-description {
    font-size: 20px;
    margin-top: 3px;
    margin-bottom: 3px;
    max-width: 708px;
    line-height: 1.3;
}

.images-row {
    display: flex;
    gap: 15px;
    margin: 8px 0;
    justify-content: center;
    flex-shrink: 0;
}

.image-frame {
    width: 320px;
    height: 180px;
    background-color: #fff;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-frame-checkmark::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-color: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.image-frame-x::after {
    content: '✕';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
}

.image-frame.large {
    width: 100%;
    max-width: 350px;
    height: 280px;
    flex-shrink: 0;
}

/* Step 2 Specific */
#page-step2 .content {
    gap: 5px;
}

.step2-container {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-shrink: 0;
}

.step2-left {
    flex: 0 0 auto;
    min-width: 250px;
}

.step2-text {
    font-size: 20px;
    margin: 6px 0;
    line-height: 1.3;
}

.step2-list {
    font-size: 20px;
    margin: 6px 0 6px 25px;
    list-style-type: disc;
    line-height: 1.3;
}

.step2-right {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
}

/* Step 3 Specific */
.image-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cutting-label {
    font-size: 20px;
    font-weight: 500;
    text-align: center;
}

/* Congratulations Page */
.congrats-content {
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.congrats-subtitle {
    font-family: 'Almarai', sans-serif;
    font-size: 32px;
    margin: 10px 0;
    line-height: 1.4;
}

.smiley-face {
    font-size: 80px;
    margin: 10px 0;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.celebration-gif {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: none;
    z-index: 0;
}

.celebration-gif img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.done-btn {
    background-color: #f4cc93;
    border: none;
    width: 240px;
    height: 70px;
    font-family: 'Kiwi Maru', serif;
    font-size: 42px;
    color: #000;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.done-btn:hover {
    background-color: #e8ba7f;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 30px;
    margin-top: auto;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    background-color: #ffede2;
    padding-top: 10px;
    padding-bottom: 10px;
}

.nav-btn {
    background-color: #f4cc93;
    border: none;
    width: 120px;
    height: 70px;
    font-family: 'Kiwi Maru', serif;
    font-size: 32px;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.nav-btn:hover {
    background-color: #e8ba7f;
}

.back-btn {
    order: 1;
}

.next-btn {
    order: 2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #ffede2;
    width: 90%;
    max-width: 800px;
    max-height: 75vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    border-radius: 0;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #d5a057;
    border: none;
    width: 80px;
    height: 70px;
    font-size: 60px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background-color: #c99447;
}

.modal-title {
    font-family: 'Kiwi Maru', serif;
    font-size: 42px;
    margin-bottom: 15px;
    color: #000;
}

.materials-list {
    font-size: 18px;
    margin-left: 30px;
    list-style-type: disc;
    margin-bottom: 15px;
    line-height: 1.5;
}

.materials-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.materials-list ul {
    list-style-type: disc;
    margin-left: 30px;
    margin-top: 5px;
}

.modal-image {
    width: 250px;
    height: 250px;
    background-color: #fff;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsive */
@media (max-width: 1440px) {
    .header-bar {
        padding: 0 40px;
    }

    .content {
        padding: 40px;
    }

    .step-card {
        width: 280px;
        height: 300px;
    }

    .step-title {
        font-size: 48px;
    }

    .step-subtitle {
        font-size: 36px;
    }

    .page-title {
        font-size: 48px;
    }
}
