:root {
    --text-color: rgba(0, 0, 0, 0.9);
    --text-color-blurred: rgba(0, 0, 0, 0.2);
    --background-color: #ffffff;
    --control-bg: rgba(255, 255, 255, 0.2);
    --modal-bg: #ffffff;
    --modal-border: #e0e0e0;
    --primary-color: #2196f3;
    --secondary-color: #f5f5f5;
}

html, body {
    margin: 0; padding: 0;
    height: 100%; overflow: hidden;
    background-color: var(--background-color);
    font-family: 'Playfair Display', serif;
    transition: all 0.3s ease;
    background-image: url('assets/bg4.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body.dark-mode {
    --text-color: rgba(255, 255, 255, 0.8);
    --text-color-blurred: rgba(255, 255, 255, 0.2);
    --background-color: #1a1a1a;
    --control-bg: rgba(26, 26, 26, 0.8);
    --modal-bg: #2d2d2d;
    --modal-border: #404040;
    --primary-color: #64b5f6;
    --secondary-color: #404040;
    background-image: url('assets/bg5.jpg');
}

#wordGoalStatus{
    width: 140px;
    text-align: center;
}
#timerStatus{
    width: 110px;
    text-align: center;
}

.hamburger-menu {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 990;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 1;
}

.hamburger-menu:hover {
    transform: translateY(-50%) scale(1.1);
}

.hamburger-menu.hidden {
    opacity: 0;
}

.dashboard {
    position: fixed;
    left: -200px;
    top: 0;
    height: 100vh;
    background: var(--control-bg);
    transition: left 0.3s ease;
    z-index: 999;
    align-content: center;
}

.dashboard.visible {
    left: 0;
}

.hamburger-menu:hover + .dashboard,
.dashboard:hover {
    left: 0;
}

.dashboard:hover ~ .hamburger-menu {
    opacity: 0;
}

#wrapper {
    position: relative;
    width: 100%; height: 100vh;
    overflow-y: scroll;
    padding-top: calc(50vh - 1em);
    padding-bottom: calc(50vh - 1em);
    box-sizing: border-box;
    scroll-behavior: smooth; /* Adicionado para rolagem suave */
}
#editor {
    outline: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 18px;
    line-height: 1.5;
    min-height: 100%;
    padding: 0 20px;
    color: var(--text-color); /* Adicionado para usar a variável de cor */
    width: 730px;
    margin: auto;
}
/* Estilos de blur e foco */
.blurred {
    filter: blur(4px);
    color: #a8a8a8cc;
}
.focused-line {
    filter: none;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.control-btn {
    background: rgba(0, 0, 0, 0);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); */
}

.control-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.4);
}

.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    font-size: 24px;
    color: var(--text-color);
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

.word-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--control-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.word-goal {
    font-size: 12px;
    color: var(--text-color-blurred);
}

.word-goal.reached {
    color: var(--primary-color);
}

.status-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: row;
    gap: 30px;
    background: var(--control-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color);
}

.status-item {
    display: none;
}

.status-item.visible {
    display: block;
}

.status-item.reached {
    color: var(--primary-color);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--modal-bg);
    border-radius: 15px;
    width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-family: roboto;
    font-weight: 300;
    margin: 0;
    font-size: 1.3em;
    color: var(--text-color);
}

.close-modal {
    display: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-body {
    padding: 10px 50px 10px 20px;
}

.modal-body input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--modal-border);
    border-radius: 5px;
    background: var(--modal-bg);
    color: var(--text-color);
    font-size: 16px;
}

.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-color);
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Markdown styles */
.editor-content strong {
    font-weight: 700;
}

.editor-content em {
    font-style: italic;
}

.editor-content h1 {
    font-size: 2em;
    margin: 0.67em 0;
}

.editor-content h2 {
    font-size: 1.5em;
    margin: 0.83em 0;
}

/* Scrollbar styles for #wrapper */
#wrapper::-webkit-scrollbar {
    width: 0px; /* Torna a barra de rolagem invisível */
}

#wrapper::-webkit-scrollbar-track {
    background: transparent;
}

#wrapper::-webkit-scrollbar-thumb {
    background: var(--text-color-blurred);
    border-radius: 4px;
}

#wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Estilo para a margem do parágrafo */
.paragraph-margin {
    margin-top: 1em;
    text-indent: 2em; /* Adiciona um recuo de 2em para o parágrafo */
}
