/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    text-align: center;
    max-width: 1200px;
    margin: auto;
}

/* Header Styles */
h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

h2 {
    font-size: 2rem;
    color: #34495e;
    margin-bottom: 15px;
}

p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    text-align: left;
}

/* Links */
a {
    color: #3498db;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

table {
    width: 100%;
    min-width: 800px; /* Minimum width to prevent cramping */
    margin: 0;
    margin-bottom: 0;
    border-collapse: collapse;
    background-color: #fff;
}

/* Ensure the first column has a minimum width */
table th:first-child,
table td:first-child {
    min-width: 150px; /* Adjust this value as needed */
    white-space: nowrap; /* Prevent text from wrapping */
}

table th,
table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #ddd;
}

table th {
    background-color: #2c3e50;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem; /* Add this */
    letter-spacing: 1px; /* Add this */
}

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

table tr:hover {
    background-color: #f1f1f1;
}

/* Audio Controls */
audio {
    margin: 5px 2px;
    width: 100%;
    max-width: 300px;
    min-width: 200px;
}

/* Audio controls container for better mobile layout */
td audio {
    display: block;
    margin: 8px auto;
}

/* Div and Figure Styling */
div {
    padding: 20px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

figure {
    margin: 20px auto;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .table-container {
        margin: 10px 0;
    }

    table {
        min-width: 700px; /* Reduced minimum width for tablets */
    }

    table th,
    table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    table th {
        font-size: 1rem;
    }

    /* Ensure first column stays readable */
    table th:first-child,
    table td:first-child {
        min-width: 120px;
        font-size: 0.85rem;
    }

    audio {
        max-width: 250px;
        min-width: 180px;
        margin: 6px auto;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.3rem;
    }

    .table-container {
        margin: 10px -10px; /* Full width on small screens */
        border-radius: 0;
    }

    table {
        min-width: 600px; /* Further reduced for phones */
    }

    table th,
    table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    table th {
        font-size: 0.9rem;
        letter-spacing: 0.5px;
    }

    table th:first-child,
    table td:first-child {
        min-width: 100px;
        font-size: 0.75rem;
        padding: 8px 4px;
    }

    audio {
        max-width: 200px;
        min-width: 150px;
        margin: 4px auto;
    }

    /* Add scroll hint */
    .table-container::after {
        content: "← Scroll horizontally to see all columns →";
        display: block;
        text-align: center;
        font-size: 0.7rem;
        color: #666;
        padding: 5px;
        font-style: italic;
    }
}

/* Alternative card layout for very small screens */
@media (max-width: 360px) {
    .table-container {
        display: none; /* Hide table on very small screens */
    }
    
    /* Show card layout instead */
    .cards-container {
        display: block;
    }
}

/* Card layout styles (hidden by default) */
.cards-container {
    display: none;
    margin: 20px 0;
}

.audio-card {
    background: #fff;
    border-radius: 8px;
    margin: 15px 0;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #2c3e50;
}

.audio-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1rem;
    text-align: left;
}

.audio-section {
    margin: 10px 0;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

.audio-section h5 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #34495e;
    text-align: left;
}

.audio-section audio {
    width: 100%;
    margin: 3px 0;
}

/* Styling for Description List */
dl {
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9; /* Light background for contrast */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    max-width: 800px; /* Limit the width */
    font-family: 'Arial', sans-serif;
}

dt {
    font-weight: bold;
    font-size: 1.2rem; /* Slightly larger font for emphasis */
    color: #2c3e50; /* Darker color for the term */
    margin-top: 15px; /* Space above each term */
    text-align: left; /* Align terms to the left */
}

dd {
    font-size: 1rem;
    color: #555; /* Softer color for the description */
    margin-left: 20px; /* Indent descriptions */
    margin-bottom: 10px; /* Space between descriptions */
    line-height: 1.6; /* Improve readability */
    text-align: left; /* Align terms to the left */
}