/* styles.css */

/* Variables CSS */
:root {
    --primary-color: #0056b3;
    --primary-color-dark: #003d7a;
    --background-color: #f4f4f4;
    --text-color: #333;
    --border-color: #ddd;
    --box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    --font-family: 'Arial', sans-serif;
}

/* Reseteo de estilos básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Estilos globales */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 20px;
}

/* Estilos de contenedor principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

/* Encabezados */
h1, h2, h3 {
    margin-bottom: 10px;
    color: var(--text-color);
}

/* Formularios */
form {
    margin-bottom: 20px;
}

input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--primary-color-dark);
}

/* Separador entre notas y editor */
.separator {
    border-top: 2px solid var(--border-color);
    margin: 20px 0;
    padding-top: 20px;
}

/* Notas */
.nota {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.nota:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nota h3 {
    margin-bottom: 10px;
}

.nota p {
    margin-bottom: 10px;
}

/* Botones en notas como enlaces */
.nota-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nota-buttons a {
    padding: 8px 16px;
    font-size: 14px;
    text-decoration: none;
    border-radius: 4px;
    color: var(--primary-color);
    transition: background-color 0.3s;
}

.nota-buttons a:hover {
    background-color: #f0f0f0;
}

.nota-time {
    font-size: 14px;
    color: #666;
}

/* Enlaces */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Menú horizontal */
.menu {
    display: flex;
    justify-content: space-between;
    background-color: var(--primary-color);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.menu a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

.menu a:hover {
    color: var(--primary-color-dark);
}

/* Diseño responsive */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: center;
    }

    .menu a {
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 10px;
    }

    input[type="text"], input[type="password"], textarea {
        padding: 10px;
    }

    button {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Estilos generales */
body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.menu span {
    font-size: 1.2em;
}

.menu a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0 10px;
}

.menu a:hover {
    color: var(--primary-color);
}

h1 {
    text-align: center;
    margin-top: 20px;
}

.search-form,
.sort-form,
form {
    margin: 20px 0;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: var(--primary-color-dark);
}

.nota {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.3s, transform 0.3s;
}

.nota:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.nota h3 {
    margin: 0;
    font-size: 1.2em;
}

.nota p {
    margin: 10px 0;
}

.nota-buttons {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.nota-buttons a {
    margin: 0;
}

/* Estilos responsive */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu a {
        padding: 5px 0;
    }

    .nota-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .nota-buttons a {
        margin-bottom: 10px;
    }

    .nota {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    h1 {
        font-size: 1.5em;
    }

    button {
        width: 100%;
        box-sizing: border-box;
    }

    input[type="text"],
    textarea {
        font-size: 1em;
    }

    .nota {
        padding: 10px;
    }

    .nota h3 {
        font-size: 1.1em;
    }

    .nota p {
        font-size: 0.9em;
    }
}

.nota.anclada {
    border: 2px solid var(--primary-color);
    background-color: #f0f8ff;
}

/* Estilos para el modo de enfoque */
.focus-mode .menu,
.focus-mode .search-form,
.focus-mode .sort-form,
.focus-mode .separator,
.focus-mode .nota:not(.focused) {
    display: none;
}

.focus-mode .nota.focused {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Estilos para el modo oscuro */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

.dark-mode .container {
    background-color: #1e1e1e;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.dark-mode .menu {
    background-color: #333;
}

.dark-mode .menu a {
    color: #e0e0e0;
}

.dark-mode .nota {
    background-color: #2c2c2c;
    border-color: #444;
}

.dark-mode .nota h3, .dark-mode .nota p {
    color: #e0e0e0;
}

.dark-mode button {
    background-color: #444;
}

.dark-mode button:hover {
    background-color: #555;
}
