.memory-done {
    opacity: 0.7;
    border: 1px solid #10b981;
}

.memory-done .btn-complete {
    background-color: #059669;
    /* Darker Green */
    cursor: default;
}

.badge-active {
    display: inline-block;
    background-color: #3b82f6;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

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

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 1rem;
    }

    /* Hide the table header on mobile */
    #memories-table thead {
        display: none;
    }

    #memories-table {
        border: none;
        background: transparent;
    }

    #memories-table tbody {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    #memories-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--card-bg);
        border-radius: 12px;
        padding: 15px;
        border: 1px solid #334155;
    }

    #memories-table td {
        display: block;
        padding: 6px 0;
        border: none;
        text-align: left;
    }

    /* Image cell */
    #memories-table td:nth-child(1) {
        order: 1;
        text-align: center;
        padding-bottom: 10px;
    }

    #memories-table td:nth-child(1) img {
        width: 80px;
        height: 80px;
    }

    /* Memory text cell */
    #memories-table td:nth-child(2) {
        order: 2;
        font-size: 1rem;
        padding-bottom: 10px;
    }

    /* Last Recalled & Next Due - side by side */
    #memories-table td:nth-child(3),
    #memories-table td:nth-child(4) {
        font-size: 0.85rem;
        color: #94a3b8;
    }

    #memories-table td:nth-child(3) {
        order: 3;
    }

    #memories-table td:nth-child(3):before {
        content: "Last: ";
        font-weight: 600;
        color: #64748b;
    }

    #memories-table td:nth-child(4) {
        order: 4;
    }

    #memories-table td:nth-child(4):before {
        content: "Next: ";
        font-weight: 600;
        color: #64748b;
    }

    /* Actions cell */
    #memories-table td:nth-child(5) {
        order: 5;
        padding-top: 10px;
        border-top: 1px solid #334155;
        margin-top: 5px;
    }

    .actions-cell {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-start;
    }

    .actions-cell button {
        flex: 1;
        min-width: 80px;
    }
}