/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgb(31, 224, 199);
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
    text-align: center;
    padding: 40px 20px;
    border-radius: 15px;
    border: 4px solid rgb(230, 126, 34);
    margin-bottom: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header p {
    font-size: 1.2em;
    font-weight: 300;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
}

/* Section Styles */
.cash-book-section {
    background-color: white;
    border: 5px solid rgb(230, 126, 34);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.cash-book-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cash-book-section h2 {
    color: rgb(31, 224, 199);
    font-size: 2em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid rgb(31, 224, 199);
}

.cash-book-section h3 {
    color: rgb(31, 224, 199);
    font-size: 1.5em;
    margin-top: 25px;
    margin-bottom: 15px;
}

.cash-book-section h4 {
    color: rgb(31, 224, 199);
    font-size: 1.2em;
    margin-bottom: 10px;
}

.content p {
    margin-bottom: 15px;
    text-align: justify;
    font-size: 1.05em;
}

.content ul {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content li {
    margin-bottom: 8px;
    line-height: 1.8;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border: 3px solid rgb(155, 89, 182);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Cash Book Tables */
.cash-book-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.cash-book-table thead {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
}

.cash-book-table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 2px solid rgb(155, 89, 182);
    font-size: 1.1em;
}

.cash-book-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: center;
}

.cash-book-table tbody tr:nth-child(even) {
    background-color: rgba(31, 224, 199, 0.1);
}

.cash-book-table tbody tr:hover {
    background-color: rgba(230, 126, 34, 0.15);
    transition: background-color 0.3s ease;
}

.cash-book-table .total-row {
    background-color: rgba(41, 128, 185, 0.3);
    font-weight: bold;
}

.cash-book-table .balance-row {
    background-color: rgba(155, 89, 182, 0.2);
    font-weight: bold;
}

.cash-book-table .grand-total-row {
    background: linear-gradient(135deg, rgba(31, 224, 199, 0.4), rgba(41, 128, 185, 0.4));
    font-weight: bold;
    font-size: 1.05em;
}

/* Double Column Table */
.double-column-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 0.95em;
}

.double-column-table thead {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
}

.double-column-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border: 2px solid rgb(155, 89, 182);
}

.double-column-table td {
    padding: 10px 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.double-column-table tbody tr:nth-child(even) {
    background-color: rgba(31, 224, 199, 0.1);
}

.double-column-table tbody tr:hover {
    background-color: rgba(230, 126, 34, 0.15);
}

/* Petty Cash Table */
.petty-cash-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    font-size: 0.95em;
}

.petty-cash-table thead {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
}

.petty-cash-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border: 2px solid rgb(155, 89, 182);
}

.petty-cash-table td {
    padding: 10px 8px;
    border: 1px solid #ddd;
    text-align: center;
}

.petty-cash-table tbody tr:nth-child(even) {
    background-color: rgba(31, 224, 199, 0.1);
}

.petty-cash-table tbody tr:hover {
    background-color: rgba(230, 126, 34, 0.15);
}

/* Question Styles */
.question {
    background-color: rgba(31, 224, 199, 0.1);
    border-left: 5px solid rgb(230, 126, 34);
    padding: 20px;
    margin: 25px 0;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Button Styles */
.show-solution {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.show-solution:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgb(155, 89, 182), rgb(230, 126, 34));
}

.show-solution:active {
    transform: translateY(-1px);
}

/* Solution Styles */
.solution {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background-color: white;
    border: 3px solid rgb(155, 89, 182);
    border-radius: 10px;
    animation: slideDown 0.4s ease;
}

.solution.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.solution .answer-note {
    background-color: rgba(230, 126, 34, 0.1);
    padding: 15px;
    border-left: 4px solid rgb(230, 126, 34);
    margin-top: 15px;
    border-radius: 5px;
    font-weight: bold;
}

.solution .calculation {
    background-color: rgba(31, 224, 199, 0.1);
    padding: 15px;
    margin: 15px 0;
    border-radius: 8px;
    border: 2px solid rgb(31, 224, 199);
}

/* Solution Table */
.solution-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.solution-table thead {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
}

.solution-table th {
    padding: 12px;
    text-align: left;
    border: 2px solid rgb(155, 89, 182);
}

.solution-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.solution-table tbody tr:nth-child(even) {
    background-color: rgba(31, 224, 199, 0.1);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
    border: 4px solid rgb(230, 126, 34);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Comment Section Styles */
.comment-section {
    background-color: white;
    border: 5px solid rgb(230, 126, 34);
    border-radius: 15px;
    padding: 30px;
    margin: 30px auto;
    max-width: 1400px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.comment-section h2 {
    color: rgb(31, 224, 199);
    font-size: 2em;
    margin-bottom: 20px;
    border-bottom: 3px solid rgb(155, 89, 182);
    padding-bottom: 10px;
}

.comment-form {
    background-color: rgba(31, 224, 199, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: rgb(41, 128, 185);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid rgb(155, 89, 182);
    border-radius: 5px;
    font-size: 1em;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.submit-comment {
    background: linear-gradient(135deg, rgb(31, 224, 199), rgb(41, 128, 185));
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.submit-comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, rgb(155, 89, 182), rgb(230, 126, 34));
}

.comments-list {
    margin-top: 30px;
}

.comment-item {
    background-color: rgba(31, 224, 199, 0.05);
    border-left: 4px solid rgb(230, 126, 34);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: bold;
    color: rgb(41, 128, 185);
    font-size: 1.1em;
}

.comment-email {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
}

.comment-date {
    color: #999;
    font-size: 0.85em;
}

.comment-text {
    margin: 15px 0;
    line-height: 1.6;
    color: #333;
}

.delete-comment {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.delete-comment:hover {
    background: linear-gradient(135deg, #cc0000, #990000);
    transform: scale(1.05);
}

.no-comments {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .cash-book-section {
        padding: 20px;
    }

    .cash-book-table,
    .double-column-table,
    .petty-cash-table {
        font-size: 0.85em;
    }

    .cash-book-table th,
    .cash-book-table td,
    .double-column-table th,
    .double-column-table td,
    .petty-cash-table th,
    .petty-cash-table td {
        padding: 8px 4px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    header {
        padding: 25px 15px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .cash-book-section h2 {
        font-size: 1.5em;
    }

    .show-solution {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}