/* General Reset */
body, h1, h2, p {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f9fafb;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #222;
}

/* Dictionary Section */
#dictionary {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
}

/* Section Headers (A, B, C...) */
.section-header {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.25rem;
    color: #444;
}

/* Phrase Item */
.phrase-item {
    margin: 0.5rem 0;
}

/* Phrase Title (Clickable Term) */
.phrase-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    cursor: pointer;
    color: #0078d4;
}

.phrase-title .phrase-link {
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit color from parent */
}

.phrase-title .phrase-link:hover {
    color: #005a9e;
}

/* Collapsed Details */
.phrase-details {
    margin-top: 0.75rem;
    display: none; /* Hidden by default */
    padding-left: 1rem;
    border-left: 2px solid #e0e0e0;
}

.phrase-details.collapsed {
    display: none;
}

.phrase-details:not(.collapsed) {
    display: block;
}

/* Details Text */
.phrase-details p {
    margin: 0.4rem 0;
    font-size: 0.9rem;
}

/* Definition and Explanation Formatting */
.phrase-details p strong {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 600;
    color: #555;
}

/* Usage Formatting */
.phrase-details .usage strong {
    font-style: normal;
}

.phrase-details .usage em {
    font-style: italic;
    color: #555;
}
