@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');


:root{
    --bg:#f1e8d3;
    --card:#c9cfba;
    --scroll-bar: #707b53; 
    --text:#424b2d;
    --cursor: #c9cfba;
    --button: #d4c6a5;
    --button-font: #746c5a;
    --preloaderbg: #c9cfba;
}

* {
  scrollbar-width: none;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-bar) transparent;
  scroll-margin-right: 10px;
}

/* PRELOADER */

#preloader{
    position:fixed;
    inset:0;

    background: var(--preloaderbg);

    display:flex;
    align-items:center;
    justify-content:center;

    z-index:9999;

    transition:opacity .6s ease;
}

#preloader.hide{
    opacity:0;
    pointer-events:none;
}

.loader{
    width:40px;
    height:40px;

    border:3px solid rgba(255,255,255,0.2);
    border-top:3px solid white;

    border-radius:50%;

    animation:spin 1s linear infinite;
}

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


/* MAIN PART */

.hide-scrollbar {
  -ms-overflow-style: none;  /* Internet Explorer and Edge */
  scrollbar-width: none;     /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;             /* Chrome, Safari, and Opera */
}

body{
    margin:0;
    height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: normal;

    background: var(--bg);
    color: var(--text);

}

.main-container {
    width:100%;
    max-height: 80vh;
    z-index:99;
    display:flex;
    justify-content:center;
    align-items:center;
    flex-direction:column;
}

button{
    padding:14px 30px;
    font-size:2em;

    border:none;
    border-radius:14px;

    background: var(--button);
    color: var(--button-font);

    cursor:pointer;

    font-family: "Ubuntu", sans-serif;
    transition: all .5s ease;
}

button:hover{
    transform:translateY(-2px);
    box-shadow:0 10px 25px rgba(0,0,0,0.2);
}

button:active {
    transform: scale(0.9);
    background: var(--button-font);
}

#btn-full {
    position: absolute;
    bottom: 10px;
    font-size: small;
    padding: 7px 12px;
}

.card{
    position: relative;
    /* visibility: hidden; */
    width:90%;
    height:0;

    overflow: hidden;

    transition: height .7s ease;

    margin-top:35px;
    box-shadow:0 10px 25px rgba(0,0,0,0.2);
    border-radius: 22px;
}

.card.open{
    height:70vh;
    /* visibility:visible; */
    
}

.letter{
    opacity: 0.9;
    user-select: none;
    background:var(--card);
    height: inherit;
    padding:40px;

    border-radius:22px;

    box-shadow:
    0 20px 40px rgba(0,0,0,0.08),
    0 2px 10px rgba(0,0,0,0.05);

    overflow-y:auto;

    font-size:1.5em;
    line-height:1.8;
}

#text{
    white-space:pre-wrap;
    text-align: justify;
    border-right: 1px solid var(--cursor);
}

.cursor{
    display:flex;
    width:10px;
    animation:blink 1s infinite;
}

@keyframes blink{
    0%,50%,100%{opacity:1;}
    25%,75%{opacity:0;}
}

.heart{

    margin-top:25px;

    font-size:28px;

    opacity:0;
    transform:scale(0.5);

    transition:all 1s ease;

    text-align:center;
}

.heart.show{
    opacity:1;
    transform:scale(1);
}
