File size: 2,785 Bytes
31f5eff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st

def apply_styles():
    # Estilos generales de la página
    st.markdown("""
        <style>
        /* Configuración general */
        .block-container {
            padding-top: 1rem;
            padding-bottom: 5rem;
        }
        
        /* Estilos del título */
        h1 {
            margin-top: -2rem;
            padding-top: 0.5rem;
            color: #2C3E50;
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 2.5rem;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        }
        
        /* Estilos del subtítulo */
        h3 {
            margin-top: 0.5rem;
            padding-top: 0rem;
            color: #34495E;
            font-family: 'Helvetica Neue', sans-serif;
            font-size: 1.2rem;
            line-height: 1.6;
        }
        
        /* Estilos del botón */
        div.stButton > button {
            background-color: #2ECC71;
            color: white;
            width: 90%;
            height: 60px;
            font-weight: bold;
            font-size: 22px;
            text-transform: uppercase;
            border: none;
            border-radius: 8px;
            display: block;
            margin: 0 auto;
            transition: all 0.3s ease;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        div.stButton > button:hover {
            background-color: #27AE60;
            box-shadow: 0 6px 8px rgba(0,0,0,0.2);
            transform: translateY(-2px);
        }
        
        /* Estilos del texto de salida */
        .story-output {
            border: 1px solid #ddd;
            border-radius: 12px;
            padding: 25px;
            background-color: #ffffff;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            margin: 20px 0;
            font-size: 1.1rem;
            line-height: 1.8;
        }
        
        /* Estilos del manual en sidebar */
        .sidebar .sidebar-content {
            background-color: #f8f9fa;
            padding: 20px;
        }
        
        /* Estilos de los inputs */
        .stTextInput > div > div > input {
            border-radius: 8px;
            border: 1px solid #ddd;
            padding: 10px;
            font-size: 1rem;
        }
        
        /* Estilos del expander */
        .streamlit-expanderHeader {
            background-color: #f8f9fa;
            border-radius: 8px;
            padding: 10px;
        }
        
        /* Estilos del interlineado general */
        p {
            line-height: 1.8;
            margin-bottom: 1.2rem;
        }
        </style>
    """, unsafe_allow_html=True)

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