@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/font-face.css');

* {
    box-sizing: border-box;
    font-family: 'Vazir', 'Nunito', 'Poppins', sans-serif;
}

html {
    direction: rtl;
    height: 100%;
    overflow: hidden;
}

body {
    margin: 0;
    padding: 0;
    background: #fafafa url('back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    /* Support for safe areas on mobile devices */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* APP FRAME */
.app-frame {
    width: 100%;
    max-width: 420px;
    height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    background: url('frame.jpg') no-repeat center center;
    background-size: 100% 100%;
    border-radius: 28px;
    border: 4px solid #125e87;
    padding: 16px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-frame::-webkit-scrollbar {
    display: none;
}

@media (max-width: 480px) {
    .app-frame {
        padding: 12px;
        max-width: 100%;
        width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right));
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* HEADER */
.header {
    background: #ffffff47;
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #3d2817;
    border: 3px solid #125e87;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.robot-icon {
    width: 53px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.header-left {
    display: flex;
    gap: 10px;
}

.header-left div{
    display: flex;
    flex-direction: column;
}

.header-left img {
    width: 40px;
    height: 43px;
}

.star-counter {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
}

@media (max-width: 480px) {
    .header {
        font-size: 14px;
        padding: 10px 12px;
        border-radius: 14px;
    }
    
    .robot-icon {
        width: 46px;
        height: 35px;
        font-size: 18px;
    }
}

.header-right div {
    display: flex;
    flex-direction: column;
}

.header-right a {
    font-weight: normal;
}

/* MASCOT CARD */
.mascot-card {
    display: flex;
    justify-content: center;
    margin: 28px auto 18px;
    max-width: 320px;
}

.mascot-card-border {
    /* background: #fef6e0; */
    border-radius: 32px;
    padding: 4px;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
    width: 70%;
}

.mascot-card-content {
    background: #f8efe4;
    /* background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px); */
    border-radius: 28px;
    padding: 10px 0px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 3px solid #125e87;
}

.mascot-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.chat-icon {
    width: 30px;
    height: 30px;
}

.mascot-card-title {
    font-size: 32px;
    font-weight: bold;
    color: #3d2817;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.mascot-image-wrapper {
    position: relative;
    margin: 0px;
}

.mascot-image {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.mascot-image:hover {
    transform: scale(1.05);
}

.mascot-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255, 200, 87, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

.chat-button {
    background: url('chat_btn.png') no-repeat center center;
}

.game-button {
    background: url('game_btn.png') no-repeat center center;
}

.school-button {
    background: url('school_btn.png') no-repeat center center;
}

.item-button {
    background-size: contain;
    border: none;
    padding: 14px 48px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    min-width: 150px;
    min-height: 50px;
    outline: none;
}

.mascot-subtitle {
    font-size: 16px;
    color: #5a4332;
    margin: 8px 0 0;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.7);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

@media (max-width: 480px) {
    .mascot-card {
        max-width: 100%;
        margin: 20px auto 16px;
    }
    
    .mascot-card-content {
        padding: 10px 0px;
    }
    
    .mascot-card-title {
        font-size: 28px;
    }
    
    .mascot-image {
        width: 120px;
        height: 120px;
    }
    
    .mascot-glow {
        width: 140px;
        height: 140px;
    }
    
    .chat-button {
        padding: 12px 40px;
        font-size: 18px;
    }
    
    .mascot-subtitle {
        font-size: 14px;
    }
}

/* OLD MASCOT STYLES - KEEPING FOR COMPATIBILITY */
.mascot-wrapper {
    display: flex;
    justify-content: center;
    margin: 10px 0 18px;
}

.mascot-wrapper img {
    width: 130px;
    max-width: 50vw;
    transition: opacity 0.3s ease-in-out;
}

.mascot-wrapper img.fade-out {
    opacity: 0;
}

/* GAME GALLERY */
.game-gallery {
    margin: 28px auto 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-gallery-head {
    text-align: center;
    color: #3d2817;
}

.game-heading {
    margin: 0;
    font-size: 26px;
}

.game-gallery-head p {
    margin: 15px 0 0;
    color: #5a4332;
    font-size: 14px;
    font-weight: bold;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.game-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.game-card:hover {
    transform: translateY(-4px);
}

.game-card-image {
    width: 80%;
    aspect-ratio: 1 / 2.06;
    object-fit: cover;
    display: block;
}

.home-card-image {
    width: 80%;
    aspect-ratio: 1 / 1.35;
    object-fit: cover;
    display: block;
}

@media (max-width: 480px) {
    .game-heading {
        font-size: 22px;
    }

    .game-subheading {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .mascot-wrapper img {
        width: 140px;
    }
}

/* CHAT */
.chat-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 20px;
    max-height: calc(100vh - 450px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 8px;
    padding-right: 8px;
}

.chat-card::-webkit-scrollbar {
    width: 6px;
}

.chat-card::-webkit-scrollbar-track {
    background: transparent;
}

.chat-card::-webkit-scrollbar-thumb {
    background: #125e87;
    border-radius: 3px;
}

.chat-card::-webkit-scrollbar-thumb:hover {
    background: #6d4e2e;
}

@media (max-width: 480px) {
    .chat-card {
        max-height: calc(100vh - 420px);
    }
}

.message-wrapper {
    display: flex;
    /* gap: 10px; */
    align-items: flex-start;
}

.robot-message {
    flex-direction: row-reverse;
}

.user-message {
    flex-direction: row;
    justify-content: flex-start;
}

.avatar {
    width: 53px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    border: 2px solid #125e87;
}

.robot-avatar {
    background: #fafafa;
}

.bubble {
    padding: 14px 18px;
    border-radius: 20px;
    font-size: 14px;
    max-width: 75%;
    line-height: 1.4;
    word-wrap: break-word;
    border: 2px solid #125e87;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

@media (max-width: 480px) {
    .bubble {
        padding: 12px 14px;
        font-size: 13px;
        max-width: 70%;
    }
}

.robot {
    background: #fafafa;
    color: #3d2817;
}

.user {
    background: #d4ede7;
    color: #1d3d37;
}

/* VASE CONTAINER */
.vase-container {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 420px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 10;
}

.vase-container .plant-icon {
    width: 70px;
    height: auto;
    pointer-events: auto;
}


/* INPUT BAR */
.input-bar {
    position: fixed;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 415px;
    background: #fafafa;
    border-radius: 20px;
    display: flex;
    align-items: center;
    padding: 5px 5px 5px 10px;
    border: 3px solid #125e87;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    gap: 8px;
    direction: rtl;
}

@media (max-width: 480px) {
    .vase-container .plant-icon {
        width: 50px;
    }
    .input-bar {
        padding: 5px 5px 5px 10px;
    }
}   

.send-btn {
    width: 56px;
    height: 56px;
    cursor: pointer;
    flex-shrink: 0;
}

.send-btn:active {
    transform: scale(0.95);
}

.input-bar textarea {
    width: 280px;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: transparent;
    color: #3d2817;
    resize: none;
    font-family: 'Vazir', 'Nunito', 'Poppins', sans-serif;
    text-align: right;
    min-height: 50px;
    max-height: 120px;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.input-bar textarea::-webkit-scrollbar {
    display: none;
}

.input-bar textarea::placeholder {
    color: #8b7355;
}

@media (max-width: 480px) {
    .input-bar textarea {
        width: 250px;
        font-size: 16px;
    }
}

/* SNACKBAR */
.snackbar {
    visibility: hidden;
    min-width: 250px;
    background-color: #125e87;
    color: #fff;
    text-align: center;
    border-radius: 16px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.snackbar.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadeout {
    from {bottom: 30px; opacity: 1;}
    to {bottom: 0; opacity: 0;}
}

.home-footer{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.home-footer span{
    font-weight: bold;
    font-size: larger;
}

.home-footer img{
    width: 70px;
    height: auto;
}

/* Authentication Modals */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9998;
}

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
}

.modal-content {
    background: url('frame.png') no-repeat center center;
    background-size: 100% 100%;
    padding: 16px;
    border-radius: 24px;
    padding: 32px 24px;
    border: 3px solid #125e87;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-content h2 {
    color: #3d2817;
    margin: 0 0 16px 0;
    font-size: 24px;
}

.modal-content p {
    color: #5d4a3a;
    margin: 0 0 24px 0;
    font-size: 16px;
    line-height: 1.5;
}

.modal-content input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #125e87;
    border-radius: 12px;
    font-size: 16px;
    margin-bottom: 16px;
    background: white;
    color: #3d2817;
    font-family: 'Vazir', sans-serif;
    transition: border-color 0.3s;
}

.modal-content input:focus {
    outline: none;
    border-color: #b8905f;
    box-shadow: 0 0 0 3px rgba(184, 144, 95, 0.2);
}

.modal-content input::placeholder {
    color: #9d8874;
}

.modal-button {
    width: 50%;
    padding: 14px 24px;
    background: url('button_blue.png') no-repeat center center;
    background-size: 100% 100%;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-family: 'Vazir', sans-serif;
}

.modal-button-secondary {
    width: 60%;
    padding: 12px 24px;
    background: url('button_red.png') no-repeat center center;
    background-size: 100% 100%;
    color: white;
    border: none;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    font-family: 'Vazir', sans-serif;
    margin-top: 8px;
}

.error-message {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
    font-weight: bold;
}

.signup-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.signup-link a {
    color: #125e87;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.signup-link a:hover {
    color: #0d4461;
}

#displayPhone {
    color: #ff5e62;
    font-weight: bold;
}

#welcomeUsername {
    color: #ff5e62;
    font-weight: bold;
    font-size: 20px;
}

#forgotPasswordPhone {
    color: #ff5e62;
    font-weight: bold;
}

.star-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    display: none;
}

.star-modal-content {
    background: url('frame.png') no-repeat center center;
    background-size: 100% 100%;
    padding: 32px 24px;
    border-radius: 24px;
    border: 3px solid #125e87;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.star-modal-content h2 {
    color: #3d2817;
    margin: 0 0 8px 0;
    font-size: 24px;
}

.star-modal-content p {
    color: #5d4a3a;
    margin: 0 0 24px 0;
    font-size: 16px;
}

.star-packages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.star-package {
    background: white;
    border: 2px solid #125e87;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.star-package:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 94, 135, 0.3);
    border-color: #ffd700;
}

.star-package.selected {
    border: 3px solid #ffd700;
    background: #fffef0;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
}

.star-package-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.star-icon-img {
    width: 32px;
    height: 32px;
}

.star-package-amount {
    font-size: 24px;
    font-weight: bold;
    color: #3d2817;
}

.star-package-price {
    font-size: 16px;
    color: #5d4a3a;
    font-weight: bold;
}

.star-package-price.discount {
    color: #10a16a;
    font-size: 18px;
}

.star-package-old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    display: block;
    margin-bottom: 4px;
}

/* Discount Code Section */
.discount-code-section {
    margin: 20px 0;
    padding: 15px;
    background: rgba(18, 94, 135, 0.05);
    border-radius: 12px;
    border: 2px dashed #125e87;
}

.discount-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #125e87;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    text-align: center;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.discount-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.3);
}

.apply-discount-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #125e87 0%, #0a4a6b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Vazir', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.apply-discount-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 94, 135, 0.4);
}

.apply-discount-btn:active {
    transform: translateY(0);
}

.discount-message {
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    min-height: 20px;
}

.star-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

.button-wrapper {
    position: relative;
    display: inline-block;
    transition: all 0.3s;
}

.button-wrapper:hover {
    transform: scale(1.05);
}

.button-wrapper:active {
    transform: scale(0.95);
}

.star-modal-button {
    width: 120px;
    height: auto;
    cursor: pointer;
    display: block;
}

.button-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 14px;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.close-star-modal {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: #125e87;
    border: 2px solid #125e87;
    border-radius: 12px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Vazir', sans-serif;
}

.close-star-modal:hover {
    background: rgba(18, 94, 135, 0.1);
}

/* ========================================
   IMAGE GENERATOR STYLES
   ======================================== */

.image-content {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.page-title {
    text-align: center;
    font-size: 28px;
    color: #333;
    margin-bottom: 30px;
    font-weight: bold;
}

.image-workspace {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.control-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.control-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    border: 2px solid #125e87;
}

.control-card h2 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #000;
}

.control-card p {
    color: black;
    font-size: 12px;
    margin-bottom: 0px;
    text-align: center;
}

.prompt-input {
    width: 100%;
    border: 2px solid #125e87;
    outline: none;
    font-size: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: transparent;
    color: #3d2817;
    resize: none;
    font-family: 'Vazir', 'Nunito', 'Poppins', sans-serif;
    text-align: right;
    min-height: 50px;
    max-height: 120px;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: border-color 0.3s;
}

.prompt-input::-webkit-scrollbar {
    display: none;
}

.prompt-input::placeholder {
    color: #8b7355;
}

.prompt-input:focus {
    outline: none;
    border-color: #125e87;
}

.prompt-input-wrapper {
    position: relative;
    width: 100%;
}

.char-counter {
    position: absolute;
    bottom: 8px;
    left: 12px;
    font-size: 11px;
    color: #999;
    font-family: 'Vazir', 'Nunito', 'Poppins', sans-serif;
    pointer-events: none;
    /* background: rgba(255, 255, 255, 0.8); */
    padding: 2px 4px;
    border-radius: 4px;
}

.image-button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 15px;
}

.icon-btn {
    width: 60px;
    height: 60px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-btn:hover:not(:disabled) {
    transform: scale(1.1);
}

.icon-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.icon-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.image-display {
    width: 100%;
}

.image-card {
    background: white;
    border-radius: 20px;
    border: 2px solid #125e87;
    padding: 10px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.generated-image-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.generated-image {
    width: 100%;
    border-radius: 15px;
}

.image-prompt-display {
    font-size: 16px;
    color: #666;
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 10px;
    width: 100%;
    margin-bottom: 15px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
}

.empty-state img {
    width: 150px;
    height: 150px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 20px;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #7B68EE;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #7B68EE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quick-prompts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-prompt-btn {
    padding: 12px;
    background: #125e87;
    border: 2px solid #125e87;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    text-align: right;
    color: white;
}

.quick-prompt-btn:hover {
    background: white;
    color: #125e87;
}

.image-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
    max-width: 600px;
}

.action-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #7B68EE;
    background: white;
    color: #7B68EE;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #7B68EE;
    color: white;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.gallery-item {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gallery-item:hover {
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .image-content {
        padding: 15px;
    }

    .page-title {
        font-size: 24px;
    }
}

/* Write page specific styles */
.story-title {
    font-size: 28px;
    font-weight: bold;
    color: #125e87;
    margin: 0 0 25px 0;
    text-align: center;
    border-bottom: 3px solid #125e87;
    padding-bottom: 15px;
}

.story-content {
    font-size: 18px;
    line-height: 2;
    color: #333;
    white-space: pre-wrap;
    text-align: justify;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.story-content p {
    margin-bottom: 20px;
}

.story-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.story-display-area {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}
