/* === Estilo común para login y 2FA === */

body {
    font-family: system-ui, sans-serif;
    background: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: #333;
}

.login-container {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 90%;
    max-width: 400px;
}

h2 {
    text-align: center;
    margin-bottom: 1rem;
}

p.subtext {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #666;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.3rem;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 0.8rem;
    background: #007BFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover {
    background: #0056b3;
}

p.error {
    color: red;
    text-align: center;
    margin-bottom: 1rem;
}

/* === MODO OSCURO AUTOMÁTICO === */
@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #f0f0f0;
    }
    .login-container {
        background: #1e1e1e;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    }
    input[type="text"], input[type="password"] {
        background: #2c2c2c;
        border: 1px solid #444;
        color: #f0f0f0;
    }
    button {
        background: #1e6fd8;
    }
    button:hover {
        background: #1557a8;
    }
    p.subtext {
        color: #aaa;
    }
}

/* Estilos para la página de marcadores */

.bookmarks-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.bookmark {
    display: block;
    padding: 15px;
    margin: 10px 0;
    background: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s;
}

.bookmark:hover {
    background: #0056b3;
}

.form-container {
    margin-top: 40px;
    padding: 20px;
    background: #f4f4f9;
    border-radius: 8px;
}

.form-container input[type="text"] {
    width: 80%;
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
}

.form-container button {
    padding: 10px 20px;
    margin-top: 10px;
    background: #28a745;
    border: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.3s;
}

.form-container button:hover {
    background: #1e7e34;
}

/* === Modo oscuro para marcadores === */
@media (prefers-color-scheme: dark) {
    .bookmarks-container {
        background: #1e1e1e;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
        color: #f0f0f0;
    }
    h1 {
        color: #f0f0f0;
    }
    .bookmark {
        background: #1a73e8;
        color: #fff;
    }
    .bookmark:hover {
        background: #145dbf;
    }
    .form-container {
        background: #2c2c2c;
    }
    .form-container input[type="text"] {
        background: #3a3a3a;
        border: 1px solid #555;
        color: #f0f0f0;
    }
    .form-container button {
        background: #2d8a3f;
    }
    .form-container button:hover {
        background: #1f5d28;
    }
}

/* === Barra de navegación unificada === */
nav {
    font-family: system-ui, sans-serif;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(6px);
    padding: 12px 16px;
    z-index: 1000;
    transition: background 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-links {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}
.nav-links a {
    text-decoration: none;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 500;
    background: transparent;
    border: none;
    user-select: none;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}
.nav-links a:hover {
    background: rgba(0,0,0,0.05);
}
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

/* Responsive */
@media (max-width: 600px) {
    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0;
        margin-top: 10px;
        background: rgba(255,255,255,0.9);
        padding: 10px;
        border-radius: 8px;
    }
    .nav-links a {
        padding: 12px;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    .menu-toggle {
        display: block;
    }
    nav.expanded .nav-links {
        display: flex;
    }
}

/* === Modo oscuro === */
@media (prefers-color-scheme: dark) {
    nav {
        background: rgba(18,18,18,0.8);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links a:hover {
        background: rgba(255,255,255,0.1);
    }
    .nav-links {
        background: rgba(34,34,34,0.95);
    }
}

