/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f4f4f4; /* Light background for contrast */
    color: #333;
    max-width: 100%;
}

h1 {
    text-align: center; /* Center the heading text */
}

/* Select field styling */
select {
    width: 250px; /* Adapts to content width instead of stretching */
    min-width: 150px; /* Prevents it from becoming too small */
    max-width: 300px; /* Keeps it from getting too wide */
    padding: 10px;
    margin: 5px; /* Adds space around each field */
    font-size: 1.3em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white !important;
    color: #9e7306;
    text-align: center;
    
    
    /* Remove default dropdown styling */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    /* Custom dropdown arrow */
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='black'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px;
}

/* Input field styling */
input {
    width: 250px; /* Matches the behavior of select fields */
    min-width: 100px;
    max-width: 200px;
    padding: 10px;
    margin: 5px; /* Adds space around each field */
    font-size: 1.3em;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    color: #9e7306;
    text-align: center;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.table th, .table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: middle;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.table tr:hover {
    background-color: #f1f1f1;
}
.table-wrapper {
    overflow-x: auto;
}

/* Forms */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group label {
    margin-bottom: 4px;
    font-weight: bold;
    text-align: left;
}
.form-fields input,
.form-fields select {
    width: 100%;
    min-width: 220px;
    max-width: 400px;
    box-sizing: border-box;
}

/* Improve Input Field Readability */
/* Improve Textarea Readability */
textarea {
    display: block; /* Ensure it's treated as a block element */
    margin: 0 auto 20px auto; /* Centers the textarea horizontally */
    width: 90%; /* Make it fit inside the container */
    max-width: 900px; /* Prevent it from exceeding container width */
    min-width: 500px; /* Ensure it doesn't get too small */
    
    height: 300px; /* Adjust height for better visibility */
    max-height: 600px; /* Prevent excessive vertical growth */
    min-height: 200px; /* Keep a reasonable minimum height */

    font-size: 1.8em; /* Make text easier to read */
    padding: 12px; /* Add inner spacing */
    border: 2px solid #333; /* Define a clear border */
    border-radius: 6px; /* Soften the corners */
    background-color: #fff; /* Ensure clear background */
    color: #9e7306; /* Dark goldenrod text color */
    text-align: center; /* Center the text */
    box-sizing: border-box; /* Ensure padding is included in size calculations */

    resize: vertical; /* Allow resizing vertically but not horizontally */
    line-height: 2; /* Improve text spacing */
    outline: none; /* Remove focus outline */
    
    /* Add a subtle glowing effect when focused */
    border-color: #333;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#text {
    color: #9e7306; /* Dark goldenrod for text */
    font-size: 1.8em; /* Taller text for readability */
    font-style: normal; /* No italics */    
}  
/* Buttons */
.button-group {
    display: flex;
    gap: 20px;           /* distance between buttons */
    justify-content: center;
    align-items: center;
}

.btn {
    min-width: 120px;
    min-height: 50px;
    padding: 10px 20px;
    background-color: #007bff;
    border: 1px solid #007bff;
    color: white;
    border-radius: 4px;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    font-weight: bold;
    display: flex;           /* For vertical align */
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Menu Bars */
.navbar {
    display: flex;
    justify-content: center; /* Center the menu items */
    background-color: #000;
    padding: 10px;
}
.navbar a {
    color: white;
    padding: 10px;
    text-decoration: none;
    text-align: center;
    flex-grow: 1; /* Distribute space equally */
}
.navbar a:hover {
    background-color: #333;
}
/* Style for Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Style for the dropdown button */
.dropdown-btn {
    color: white;
    text-decoration: none;
    padding: 10px;
    display: block;
    text-align: center;
    width: 200px; /* Set the width of the main menu item */
}

.dropdown-content {
    display: none; /* Initially hide the submenu */
    position: absolute;
    background-color: #fff;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
    min-width: 160px;
    width: 100%; /* Match the width of the dropdown container */
}

.dropdown-content a {
    color: #333;
    padding: 10px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f1f1f1; /* Highlight on hover */
}

.dropdown:hover .dropdown-content {
    display: block; /* Show submenu on hover */
}

/* Spruch Container */
.random-spruch-container {
    width: 95%; /* Make it responsive within the page */
    max-width: 1000px; /* Prevent it from becoming too wide */
    min-width: 600px; /* Maintain a reasonable minimum size */

    height: auto; /* Allow height to expand dynamically */
    min-height: 400px; /* Prevent it from being too small */
    max-height: 750px; /* Avoid excessive height growth */

    margin: 50px auto; /* Center it with vertical spacing */
    padding: 30px; /* Provide enough inner spacing */

    background-color: #fff; /* Clear background */
    border: 2px solid #ddd; /* Soft border for contrast */
    border-radius: 10px; /* Slightly rounded corners for aesthetics */

    text-align: center; /* Center text inside */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    
    /* Centering the container on the page */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination a {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
    border-radius: 4px;
    text-decoration: none;
}

.pagination a:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Responsive Design with Media Queries */
@media (max-width: 768px) {
    .table th, .table td {
        padding: 5px;
    }
    .exercise-group {
        flex-direction: column;
        align-items: center; /* centers content horizontally when stacked */
    }

    .navbar {
        flex-direction: column;
    }
    .navbar a {
        padding: 8px;
    }

    .button-group button {
        width: 100%;
        margin: 10px 0;
    }
    .responsive-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
@media (max-width: 480px) {
    .navbar a {
        font-size: 14px;
    }
    body {
        font-size: 14px;
    }
    .button-group button {
        font-size: 14px;
        padding: 6px 10px;
    }
    .responsive-container {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}
