:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #2980b9;
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --section-bg: #ffffff;
    --border-radius: 10px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --font-stack: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 2rem;
    line-height: 1.7;
}

.container {
    max-width: 900px;
    margin: 0 auto 2rem;
    background-color: var(--section-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.6rem;
    margin-top: 2rem;
    border-left: 5px solid var(--accent-color);
    padding-left: 0.6rem;
}

h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    color: var(--secondary-color);
}

ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin: 0.5rem 0;
}

section {
    margin-bottom: 2rem;
}

.contact {
    margin-bottom: 2rem;
    font-size: 1rem;
    color: var(--secondary-color);
}

/* Footer styles – now part of normal flow */
#footer {
    background-color: var(--section-bg);
    padding: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-top: 2rem;
    text-align: center;
}
#footer h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--primary-color);
}
#footer p {
    margin: 0.3rem 0;
}

/* Theme toggle button */
#theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    cursor: pointer;
    z-index: 1000;
}

/* Day/Night themes */
body.day {
    --background-color: #ecf0f1;
    --text-color: #2c3e50;
    --section-bg: #ffffff;
}
body.night {
    --background-color: #1c2833;
    --text-color: #ecf0f1;
    --section-bg: #2c3e50;
}
/* apply theme vars */
body, .container, #footer, .modal-content, h1, h2, h3, strong, p,
.modal-header, .modal-header h2,
.feedback-form label, .feedback-form input, .feedback-form textarea,
#footer h4, #footer p, #footer strong,
#comments h4, #comments p {
    background-color: var(--section-bg);
    color: var(--text-color);
}

/* Щоб поле вводу не лишалося білого кольору в темній темі */
.feedback-form input,
.feedback-form textarea {
    border: 1px solid var(--text-color);
}

/* Modal overlay and positioning */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.hidden {
    display: none;
}
.modal-content {
    position: relative;
    background: var(--section-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 500px;
    width: 90%;
}

/* Modal header – title + close on same line */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
}
.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

/* Feedback form styling */
.feedback-form {
    display: flex;
    flex-direction: column;
}
.feedback-form label {
    margin-top: 1rem;
    font-weight: bold;
}
.feedback-form input,
.feedback-form textarea {
    width: 100%;
    padding: 0.7rem;
    margin-top: 0.3rem;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    font-family: var(--font-stack);
    font-size: 1rem;
    background: var(--background-color);
    color: var(--text-color);
}
.feedback-form textarea {
    resize: vertical;
    min-height: 100px;
}
.feedback-form input:focus,
.feedback-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(41, 128, 185, 0.3);
}
.feedback-form button[type="submit"] {
    margin-top: 1.5rem;
    align-self: flex-end;
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    box-shadow: var(--box-shadow);
}
.feedback-form button[type="submit"]:hover {
    background-color: #1f5f86;
}
