/* GENERAL PAGE STYLE */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f7f2e7;
    color: #4a3f35;
}

/* ⭐ MAIN MUST BE FULL WIDTH */
main {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px;
}

/* HEADER */
header {
    background: #d8c3a5;
    padding: 15px;
    text-align: center;
}

.logo {
    width: 300px;
    height: auto;
    margin-bottom: 10px;
}

/* MAIN CONTENT CARD */
.card {
    background: white;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 0 10px #c19a6b;
}

/* ⭐ WIDE CARD FOR RESULTS */
.card-wide {
    background: white;
    padding: 20px;
    margin: 20px auto;
    max-width: 1600px;
    border-radius: 10px;
    box-shadow: 0 0 10px #c19a6b;
}

/* INPUT FIELDS */
input, textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    border: 1px solid #c19a6b;
    font-size: 16px;
}

/* BUTTONS */
button, .btn {
    background: #c19a6b;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
}

button:hover, .btn:hover {
    background: #a67c52;
}

/* SMALL BUTTONS */
/* ⭐ FIX: Make Edit/Delete buttons readable */
.btn-small {
    background: #6b4f2a;      /* dark brown */
    color: #ffffff;           /* white text */
    padding: 6px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.btn-small:hover {
    background: #4a3f35;      /* darker brown */
}

.btn-small.delete {
    background: #b33a3a;      /* strong red */
    color: #ffffff;           /* white text */
}

.btn-small.delete:hover {
    background: #8a2c2c;      /* darker red */
}


/* CAPTCHA BOX */
.captcha-box {
    background: #d8c3a5;
    padding: 8px;
    margin: 10px 0;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

/* FOOTER */
footer {
    background: #d8c3a5;
    padding: 10px;
    text-align: center;
    margin-top: 20px;
}

/* ⭐ WIDE + SCROLLABLE RESULTS */
.results-wide-container {
    width: 100%;
    overflow-x: auto;
    padding: 10px 0;
}

.result-list-wide {
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 1400px;
}

.result-item-wide {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 10px;
    background: #fafafa;
    border-radius: 8px;
}

.result-text-wide {
    width: 80%;
    white-space: normal;
    word-break: break-word;
    line-height: 1.5;
}

.field-label {
    font-weight: bold;
    color: #444;
}

.result-actions-wide {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.btn-small {
    padding: 6px 10px;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
}

.btn-small.delete {
    background: #ffdddd;
}

/* DETAILS PAGE */
.details-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
}

.details-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.details-label {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.details-input {
    width: 100%;
    padding: 16px;
    font-size: 1.15rem;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.details-textarea {
    width: 100%;
    height: 220px;
    padding: 16px;
    font-size: 1.15rem;
    border-radius: 10px;
    border: 1px solid #ccc;
    resize: vertical;
}

.details-btn {
    padding: 16px 20px;
    font-size: 1.25rem;
    border-radius: 10px;
}

/* NOTES PAGE */
.notes-title {
    font-size: 28px;
    margin-bottom: 20px;
}

.back-btn-container {
    margin-bottom: 20px;
}

.back-btn {
    display: inline-block;
    background: #2196F3;
    color: white;
    padding: 10px 18px;
    font-size: 18px;
    border-radius: 6px;
    text-decoration: none;
}

.back-btn:hover {
    background: #1976D2;
}

.add-note-container,
.show-all-container {
    margin-bottom: 20px;
}

.note-btn {
    background: #4CAF50;
    color: white;
    padding: 12px 20px;
    font-size: 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    margin-right: 10px;
}

.note-btn:hover {
    background: #45a049;
}

.note-divider {
    margin: 30px 0;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.note-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #4CAF50;
    box-shadow: 0 0 5px #c19a6b;
}

.note-card-title {
    font-size: 22px;
    margin-bottom: 10px;
}

.note-card-text {
    font-size: 18px;
    white-space: pre-wrap;
    margin-bottom: 15px;
}

.note-actions a {
    margin-right: 15px;
    font-size: 18px;
    text-decoration: none;
}

.note-edit {
    color: #007bff;
}

.note-edit:hover {
    color: #0056b3;
}

.note-delete {
    color: #d9534f;
}

.note-delete:hover {
    color: #b52b27;
}

/* TOP NAV */
.top-nav {
    float: right;
    margin-top: -40px;
}

.logout-btn {
    font-weight: bold;
    color: #c00;
    text-decoration: none;
}

/* ⭐ MOBILE FRIENDLY */
@media (max-width: 768px) {

    main {
        max-width: 100%;
        padding: 5px;
    }

    .card {
        max-width: 95%;
    }

    .card-wide {
        max-width: 95%;
        padding: 15px;
    }

    .result-list-wide {
        min-width: 100%;
    }

    .result-item-wide {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-text-wide {
        width: 100%;
    }

    .result-actions-wide {
        flex-direction: row;
        gap: 10px;
        margin-top: 10px;
    }

    .btn-small {
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* ⭐ EXTRA SMALL DEVICES */
@media (max-width: 480px) {

    .logo {
        width: 200px;
    }

    .btn, button {
        width: 100%;
        text-align: center;
    }

    .result-actions-wide {
        flex-direction: column;
        width: 100%;
    }

    .result-item-wide {
        padding: 10px;
    }

    .result-text-wide {
        font-size: 14px;
    }
}

