/* styles.css */

/* Reset and base styles for clean, minimal design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* App container */
#app {
    max-width: 1200px;
    width: 100%;
}

/* Notes container for home view */
.notes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Individual note card styling: Rounded corners, soft shadow, like Google Keep */
.note-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s;
}

.note-card:hover {
    transform: translateY(-5px);
}

.note-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.note-card p {
    font-size: 14px;
    margin-bottom: 10px;
}

.note-card img {
    max-width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
}

.note-card audio {
    width: 100%;
    margin-bottom: 10px;
}

/* QR code container in card */
.qr-code {
    width: 80px;
    height: 80px;
    margin: 10px auto 0;
}

/* Action buttons in card */
.note-actions {
    display: flex;
    justify-content: space-between;
}

.note-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.note-actions button:hover {
    color: #333;
}

/* Single note view */
.single-note-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

#back-button {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    margin-bottom: 20px;
}

#single-note-content h2 {
    margin-bottom: 10px;
}

#single-note-content p, #single-note-content img, #single-note-content audio {
    margin-bottom: 20px;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 30px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s;
}

.fab:hover {
    background-color: #0056b3;
}

/* Modal for note creation/editing */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    margin-bottom: 15px;
}

#note-title {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.note-type-tabs {
    display: flex;
    margin-bottom: 10px;
}

.tab {
    flex: 1;
    padding: 10px;
    border: none;
    background-color: #eee;
    cursor: pointer;
}

.tab.active {
    background-color: #007bff;
    color: #fff;
}

.note-content {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

#image-preview, #voice-preview {
    max-width: 100%;
    margin-top: 10px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 10px 20px;
    margin-left: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#save-note {
    background-color: #007bff;
    color: #fff;
}

#cancel-note {
    background-color: #ddd;
}

/* Hidden class */
.hidden {
    display: none;
}

/* Responsive design: Adjust for mobile */
@media (max-width: 600px) {
    .notes-container {
        grid-template-columns: 1fr;
    }
    
    .fab {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 25px;
    }
}