/* ===== STORY BOX - PREMIUM DESIGN ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

.story-box-section {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 20px;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

/* ===== MAIN BOX ===== */
.story-box {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 48px;
    padding: 40px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 215, 0, 0.1) inset,
        0 0 30px rgba(255, 215, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Decorative Elements */
.story-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.03) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.story-box::after {
    content: '“';
    position: absolute;
    bottom: 20px;
    left: 30px;
    font-size: 150px;
    color: rgba(255, 215, 0, 0.1);
    font-family: serif;
    line-height: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.story-box:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 
        0 40px 80px rgba(255, 215, 0, 0.2),
        0 0 0 2px rgba(255, 215, 0, 0.3) inset,
        0 0 40px rgba(255, 215, 0, 0.3);
}

/* ===== IMAGE CONTAINER ===== */
.story-image-container {
    width: 100%;
    height: 280px;
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3);
    border: 3px solid rgba(255, 215, 0, 0.3);
}

.story-image-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.4));
    z-index: 1;
    pointer-events: none;
}

.story-fixed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-box:hover .story-fixed-image {
    transform: scale(1.08);
}

/* Image Caption */
.image-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255,215,0,0.9);
    padding: 6px 15px;
    border-radius: 30px;
    z-index: 2;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
}

/* ===== STORY CONTENT ===== */
.story-content {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    border-radius: 32px;
    padding: 30px;
    margin-top: -50px;
    box-shadow: 0 -20px 40px -10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,215,0,0.2);
}

/* Story Title */
.story-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1a1f2e, #2a2f3f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    line-height: 1.3;
    position: relative;
    display: inline-block;
}

.story-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FDB931);
    border-radius: 4px;
}

/* Scrollable Story */
.story-text-scroll {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 20px;
    margin: 25px 0;
    scrollbar-width: thin;
    scrollbar-color: #FFD700 #e0e0e0;
}

.story-text-scroll::-webkit-scrollbar {
    width: 6px;
}

.story-text-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.story-text-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    border-radius: 10px;
}

.story-text {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #2a2f3f;
    font-weight: 400;
}

/* Signature */
.story-signature {
    font-size: 1.4rem;
    color: #FFD700;
    text-align: right;
    border-top: 2px dashed rgba(255,215,0,0.4);
    padding-top: 20px;
    margin-top: 10px;
    font-family: 'Dancing Script', cursive;
    position: relative;
}

.story-signature::before {
    content: '✍️';
    position: absolute;
    left: 20px;
    top: 15px;
    font-size: 1.2rem;
    opacity: 0.6;
}

/* ===== MAIN TITLE ===== */
.box-main-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    margin: 40px 0 30px;
    padding: 20px;
    background: linear-gradient(135deg, #FFD700, #FDB931, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(255,215,0,0.5); }
    to { text-shadow: 0 0 20px rgba(255,215,0,0.8); }
}

.box-main-title::before,
.box-main-title::after {
    content: '✨';
    margin: 0 15px;
    font-size: 2rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

.box-main-title::after {
    content: '✨';
    animation-delay: 0.5s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* ===== WRITE BUTTON ===== */
.write-story-btn-container {
    text-align: center;
    margin: 30px 0 20px;
    position: relative;
}

.write-story-btn {
    background: linear-gradient(135deg, #FFD700, #FDB931, #FF8C00);
    background-size: 200% 200%;
    color: #1a1f2e;
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 
        0 15px 30px -5px rgba(255,215,0,0.4),
        0 0 0 2px rgba(255,255,255,0.5) inset;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.write-story-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.write-story-btn:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: 
        0 25px 40px -5px rgba(255,215,0,0.6),
        0 0 0 3px rgba(255,255,255,0.7) inset;
}

.write-story-btn:hover::before {
    left: 100%;
}

.write-story-btn:active {
    transform: scale(0.98);
}

/* ===== MODAL ===== */
.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.story-modal.show {
    display: flex;
    opacity: 1;
    animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(8px); }
}

.modal-content {
    background: white;
    border-radius: 48px;
    padding: 50px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 
        0 40px 80px rgba(0,0,0,0.3),
        0 0 0 3px #FFD700,
        0 0 30px #FFD700;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.story-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content h2 {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #FFD700, #FDB931);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1f2e;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: #f8f9ff;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 5px rgba(255,215,0,0.1);
    background: white;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: #FDB931;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    gap: 15px;
    margin-top: 35px;
}

.submit-btn, .cancel-btn {
    flex: 1;
    padding: 16px 25px;
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    color: #1a1f2e;
    box-shadow: 0 8px 15px -5px rgba(255,215,0,0.4);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(255,215,0,0.6);
}

.cancel-btn {
    background: #f0f0f0;
    color: #666;
    border: 2px solid #e0e0e0;
}

.cancel-btn:hover {
    background: #e0e0e0;
    transform: translateY(-3px);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,215,0,0.3);
    border-radius: 50%;
    border-top-color: #FFD700;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .story-box {
        padding: 30px;
    }
    
    .story-title {
        font-size: 2.2rem;
    }
    
    .box-main-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .story-box {
        padding: 25px;
        border-radius: 36px;
    }
    
    .story-image-container {
        height: 220px;
    }
    
    .story-content {
        padding: 25px;
        margin-top: -40px;
    }
    
    .story-title {
        font-size: 1.8rem;
    }
    
    .story-title::after {
        width: 60px;
    }
    
    .story-text {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .story-signature {
        font-size: 1.2rem;
    }
    
    .box-main-title {
        font-size: 1.6rem;
        padding: 15px;
    }
    
    .box-main-title::before,
    .box-main-title::after {
        font-size: 1.4rem;
        margin: 0 8px;
    }
    
    .write-story-btn {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
    
    .modal-content {
        padding: 35px 25px;
    }
    
    .modal-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .story-box {
        padding: 20px;
        border-radius: 28px;
    }
    
    .story-image-container {
        height: 180px;
        border-radius: 24px;
    }
    
    .story-content {
        padding: 20px;
        margin-top: -30px;
    }
    
    .story-title {
        font-size: 1.5rem;
    }
    
    .box-main-title {
        font-size: 1.3rem;
    }
    
    .box-main-title::before,
    .box-main-title::after {
        display: none;
    }
    
    .write-story-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
        width: 100%;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.story-box {
    animation: float 6s ease-in-out infinite;
}

/* Custom Font for Signature */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;700&display=swap');
