﻿/* =========================
   VARIABLES & TEMA
========================= */
:root {
    --bg-main: linear-gradient(135deg, #eef2ff, #f8fafc);
    --card: #ffffff;
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 4px 12px rgba(0,0,0,.06);
    --shadow: 0 15px 35px rgba(0,0,0,.1);
}

/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text);
}

/* =========================
   LOGIN / REGISTER
========================= */
.login-container {
    max-width: 420px;
    margin: 7vh auto;
    background: var(--card);
    padding: 2.7rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    animation: fadeUp .5s ease;
}

.logo {
    text-align: center;
    margin-bottom: 2.2rem;
}

    .logo h1 {
        font-size: 2.4rem;
        color: var(--primary);
        letter-spacing: -.5px;
    }

    .logo p {
        color: var(--muted);
        font-size: .95rem;
    }

.form-group {
    margin-bottom: 1.4rem;
}

label {
    display: block;
    margin-bottom: .4rem;
    font-size: .85rem;
    color: var(--muted);
}

.form-control {
    width: 100%;
    padding: .8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-size: .95rem;
    transition: all .2s ease;
    background: #fafafa;
}

    .form-control:focus {
        background: #fff;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(99,102,241,.15);
        outline: none;
    }

.btn {
    width: 100%;
    padding: .85rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

.links {
    margin-top: 1.8rem;
    text-align: center;
    font-size: .85rem;
}

    .links a {
        color: var(--primary);
        text-decoration: none;
    }

        .links a:hover {
            text-decoration: underline;
        }

/* =========================
   HEADER
========================= */
header {
    background: var(--card);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

    header a {
        color: var(--danger);
        font-weight: 500;
        text-decoration: none;
    }

        header a:hover {
            color: var(--danger-hover);
        }

/* =========================
   BOTÓN FLOTANTE
========================= */
.add-link {
    position: fixed;
    right: 28px;
    bottom: 28px;
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    border-radius: 50%;
    font-size: 2.4rem;
    line-height: 62px;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform .15s;
}

    .add-link:hover {
        transform: scale(1.05);
    }

/* =========================
   NOTAS (CARDS)
========================= */
.notas {
    max-width: 900px;
    margin: 2.5rem auto;
    padding: 0 1rem;
    display: grid;
    gap: 1.6rem;
}


.notaList {
    height: 110px;
    overflow: hidden;
    background: var(--card);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
}

    .notaList:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow);
    }

.notaHeader {
    display: flex;
    align-items: center;
    gap: .6rem;
}

    .notaHeader label {
        font-size: 1.15rem;
        font-weight: 600;
        flex: 1;
    }

.date {
    font-size: .75rem;
    color: var(--muted);
    white-space: nowrap;
}

.options a {
    margin-left: .5rem;
    text-decoration: none;
    font-size: 1.1rem;
    opacity: .7;
    transition: opacity .15s, transform .15s;
}

    .options a:hover {
        opacity: 1;
        transform: scale(1.1);
    }

.notaList p {
    margin-top: .9rem;
    color: #374151;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* =========================
   MODALES
========================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 100;
    animation: fadeIn .2s ease;
}

    .modal form,
    .modal .nota {
        background: var(--card);
        width: 100%;
        max-width: 680px;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow);
        padding: 1.6rem;
        animation: scaleIn .25s ease;
    }

.modal-actions {
    display: flex;
    gap: .5rem;
}

    .modal-actions button,
    .modal-actions a {
        border-radius: var(--radius-sm);
        padding: .45rem .75rem;
        border: none;
        cursor: pointer;
        color: #fff;
        background: var(--primary);
        text-decoration: none;
    }

    .modal-actions a {
        background: var(--danger);
    }

/* =========================
   TEXTAREA
========================= */
textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

/* =========================
   IMÁGENES
========================= */
.imagenes-grid {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
    gap: 1rem;
}

    .imagenes-grid img {
        width: 100%;
        height: 130px;
        object-fit: cover;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-sm);
    }

.img-box {
    text-align: center;
    font-size: .8rem;
}

/* =========================
   ANIMACIONES
========================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 600px) {
    .notaHeader {
        flex-direction: column;
        align-items: flex-start;
    }

    .options {
        margin-top: .4rem;
    }
}
