    :root {
        --bg-color: #f5f5f5;
        --text-color: #121212;
        --form-bg: #ffffff;
        --input-bg: #f9f9f9;
        --button-bg: #121212;
        --button-color: #ffffff;
        --note-bg: #ffffff;
        --note-text: #121212;
        --shadow-color: rgba(0, 0, 0, 0.1);
    }

    body.dark {
        --bg-color: #121212;
        --text-color: #f5f5f5;
        --form-bg: #1e1e1e;
        --input-bg: #2a2a2a;
        --button-bg: #ffffff;
        --button-color: #121212;
        --note-bg: #1c1c1c;
        --note-text: #f5f5f5;
        --shadow-color: rgba(255, 255, 255, 0.05);
    }

    body {
        font-family: 'Segoe UI', sans-serif;
        background: var(--bg-color);
        color: var(--text-color);
        margin: 0;
        padding: 20px;
        transition: background 0.3s, color 0.3s;
    }

    h1 {
        text-align: center;
        margin-bottom: 20px;
        color: var(--text-color);
        font-weight: 600;
        font-style: italic;
        letter-spacing: 2px;
        opacity: 0;
        transform: translateY(-20px);
        animation: fadeSlideIn 1.5s ease-out forwards;
    }

    small {
        font-size: 10px;
    }

    @keyframes fadeSlideIn {
        0% {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
        }

        60% {
            opacity: 1;
            transform: translateY(5px) scale(1.02);
        }

        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .theme-toggle {
        position: fixed;
        bottom: 20px;
        left: 20px;
        padding: 10px 18px;
        cursor: pointer;
        background: var(--button-bg);
        color: var(--button-color);
        border: none;
        border-radius: 8px;
        font-weight: bold;
        transition: 0.3s;
        z-index: 1000;
    }

    .theme-toggle:hover {
        opacity: 0.8;
    }


    .form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--form-bg);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
    margin-bottom: 20px;
    width: 100%;       /* ocupa toda a largura do container */
    max-width: 500px;  /* não fica gigante em telas grandes */
    margin-left: auto;
    margin-right: auto; /* centraliza */
    box-sizing: border-box;
}

    input,
    textarea,
    button {
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #ccc;
        outline: none;
        font-size: 14px;
        transition: background 0.3s, color 0.3s;
    }

    input,
    textarea {
        background: var(--input-bg);
        color: var(--text-color);
    }

    textarea::placeholder {
        color: #888888;
    }

    .button {
        background: var(--button-bg);
        color: var(--button-color);
        font-weight: bold;
        cursor: pointer;
        transition: 0.3s;
    }

    .button:hover {
        opacity: 0.8;
    }

    .notes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

    .note {
        background: var(--note-bg);
        padding: 12px;
        border-radius: 12px;
        box-shadow: 0 4px 10px var(--shadow-color);
        transition: transform 0.2s, opacity 0.4s, max-height 0.4s ease-out, background 0.3s, box-shadow 0.3s;
        opacity: 1;
        max-height: 500px;
        overflow: hidden;
    }

    .note.hide {
        opacity: 0;
        max-height: 0;
        transform: translateX(50px);
    }

    .note.removing {
        animation: slideOut 0.5s ease-in forwards;
    }

    .note:hover {
        transform: scale(1.02);
    }

    .note img {
        max-width: 100%;
        max-height: 200px;
        display: block;
        margin: 0 auto 10px auto;
        border-radius: 10px;
    }

    .note p {
        color: var(--note-text);
        font-size: 14px;
        line-height: 1.4;
    }

    .delete-btn {
        margin-top: 10px;
        background: var(--button-bg);
        color: var(--button-color);
        font-weight: bold;
        width: 100%;
        border-radius: 8px;
        transition: 0.3s;
    }

    .delete-btn:hover {
        opacity: 0.8;
    }

    footer {
        text-align: center;
        padding: 15px;
        margin-top: 20px;
        color: var(--text-color);
        font-size: 14px;
    }

    a {
        color: var(--text-color);
        text-decoration: none;
        font-weight: bold;
    }

@media screen and (max-width: 480px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 1.8rem; /* maior */
    }

    .form {
        padding: 20px; /* mais espaçamento interno */
        border-radius: 12px;
        width: 100%; /* ocupar toda a largura */
        max-width: 100%; /* tirar limite */
    }

    input,
    textarea,
    button {
        font-size: 16px; /* maior legibilidade */
        padding: 14px;   /* maior toque */
    }

    .notes {
        grid-template-columns: 1fr; /* 1 coluna no celular */
        gap: 15px;
    }

    .theme-toggle {
        padding: 8px 12px;
        font-size: 14px;
    }
}
