File size: 2,783 Bytes
5bba411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1048e48
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
import streamlit as st

def apply_styles():
    return """
        <style>
        h1, h3 {
            text-align: center;
        }
        
        .stButton > button {
            background-color: #FFD700 !important;
            color: black !important;
            border: 1px solid black !important;
            font-weight: bold !important;
            width: 80% !important;
            margin-left: 10% !important;
        }
        
        [data-testid="stDownloadButton"] {
            text-align: center;
            display: flex;
            justify-content: center;
            margin-top: 5px;
            width: 90%;
            margin-left: auto;
            margin-right: auto;
        }
        
        [data-testid="stDownloadButton"] button {
            width: 100%;
            border-radius: 5px;
            height: 3em;
            background: linear-gradient(to right, #00D100, #009900);
            color: white;
            font-weight: bold;
            transition: all 0.3s ease;
            border: none;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        [data-testid="stDownloadButton"] button:hover {
            background: linear-gradient(to right, #00C000, #008800);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }
        </style>
    """
    st.markdown("""
        <style>
        .stTextArea > label {
            font-size: 1.2rem;
            font-weight: bold;
            color: #2c3e50;
        }
        
        .stSelectbox > label {
            font-size: 1.2rem;
            font-weight: bold;
            color: #2c3e50;
        }
        
        .stSlider > label {
            font-size: 1.2rem;
            font-weight: bold;
            color: #2c3e50;
        }
        
        .stButton > button {
            background-color: #2c3e50;
            color: white;
            padding: 0.5rem 2rem;
            font-size: 1.1rem;
            font-weight: bold;
            border-radius: 5px;
        }
        
        .stButton > button:hover {
            background-color: #34495e;
        }
        
        h1 {
            color: #2c3e50;
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }
        
        h3 {
            color: #34495e;
            font-size: 1.3rem;
            font-weight: normal;
            margin-bottom: 2rem;
        }
        
        .stMarkdown {
            font-size: 1.1rem;
        }
        
        .element-container {
            margin-bottom: 1.5rem;
        }
        </style>
    """, unsafe_allow_html=True)

def format_story_output(story_text):
    return f"""
        <div class="story-output">
            {story_text}
        </div>
    """