html {
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease;
}

html.dark-theme {
    background-color: #0d0f14;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

body.dark-theme {
    color: #e0e6ed;
    background: #161920;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 20px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

body.dark-theme .header-container {
    border-bottom-color: #2c3340;
}

.header-title {
    font-size: 2em;
    font-weight: bold;
    color: #2c3e50;
    transition: color 0.3s ease;
}

body.dark-theme .header-title {
    color: #ffffff;
}

.theme-btn {
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.theme-btn:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.theme-btn:active {
    transform: translateY(0);
}

h1 {
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
    transition: color 0.3s ease;
}

body.dark-theme h1 {
    color: #ffffff;
}

h2 {
    font-size: 1.8em;
    color: #2980b9;
    margin-top: 35px;
    margin-bottom: 15px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 8px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

body.dark-theme h2 {
    color: #3498db;
    border-bottom-color: #2c3340;
}

h3 {
    font-size: 1.3em;
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

body.dark-theme h3 {
    color: #ffffff;
}

p {
    margin: 10px 0;
    font-size: 1.05em;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

body.dark-theme a {
    color: #3498db;
}

body.dark-theme a:hover {
    color: #5dade2;
}

ul {
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
    font-size: 1.05em;
}

hr {
    display: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

body.dark-theme table {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

th,
td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

body.dark-theme th,
body.dark-theme td {
    border-color: #2c3340;
}

th {
    background-color: #3498db;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1em;
}

body.dark-theme th {
    background-color: #2980b9;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

body.dark-theme tr:nth-child(even) {
    background-color: #1c2029;
}

tr:hover {
    background-color: #f1f4f6;
}

body.dark-theme tr:hover {
    background-color: #2c3340;
}

strong {
    color: #2c3e50;
    transition: color 0.3s ease;
}

body.dark-theme strong {
    color: #ffffff;
}

.comment-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 0;
    transition: border-color 0.3s ease;
}

body.dark-theme .comment-item {
    border-bottom-color: #2c3340;
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    margin-bottom: 5px;
}

.comment-header a {
    font-weight: bold;
    color: #007bff;
}

body.dark-theme .comment-header a {
    color: #3498db;
}

.comment-body {
    font-size: 1em;
    color: #555;
}

body.dark-theme .comment-body {
    color: #bdc3c7;
}

footer {
    margin-top: 45px;
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    font-size: 0.85em;
    color: #7f8c8d;
    transition: border-color 0.3s ease, color 0.3s ease;
}

body.dark-theme footer {
    border-top-color: #2c3340;
    color: #7f8c8d;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-theme .modal-content {
    background-color: #1f232b;
    color: #e0e6ed;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8em;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

body.dark-theme .close-btn:hover {
    color: #ffffff;
}

.modal h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    color: #2c3e50;
    border-bottom: none;
    padding-bottom: 0;
}

body.dark-theme .modal h2 {
    color: #ffffff;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    font-size: 0.95em;
    box-sizing: border-box;
    font-family: inherit;
    transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background-color: #161920;
    border-color: #2c3340;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus {
    border-color: #3498db;
}

.form-group textarea {
    height: 90px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #4f46e5;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1.05em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    background-color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

body.dark-theme .submit-btn {
    background-color: #4f46e5;
}

body.dark-theme .submit-btn:hover {
    background-color: #4338ca;
}