.footer {
    width: 100%;
}

.parent-vowel {
    display: grid;
    grid-template-columns: 1fr 8fr 1fr 300px;
    grid-template-rows: 1fr;
    grid-column-gap: 2px;
    grid-row-gap: 2px;
}

.div1-vowel { 
    grid-area: 1 / 1 / 2 / 2; 
}

.div2-vowel { 
    grid-area: 1 / 3 / 2 / 4; 
}

.div3-vowel { 
    grid-area: 1 / 2 / 2 / 3; 
}

.sidebar { 
    grid-area: 1 / 4 / 2 / 5;
}

.text {
    padding: 5px;
}

.text a {
    color: #1A73E8;
}

.text b,
.text strong {
    font-weight: 700;
}

.text ul {
    list-style-type: disc;
    margin-left: 30px;
    padding-left: 0;
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}

/* Base styles */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
}

.parent-vowel p {
    margin-bottom: 20px;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}

.parent-vowel p a {
    color: #1A73E8;
}

.parent-vowel h2,
.parent-vowel h3 {
    margin-bottom: 20px;
}

/* Character Identifier specific styles */
.ci-container {
    max-width: none;
    width: 100%;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #FFFFFF;
}

.ci-title {
    font-size: 32px;
    color: #333;
    margin: 0;
    text-align: center;
    padding: 10px 0;
}

.ci-intro {
    width: 100%;
    text-align: center;
    margin: 0 0 15px 0;
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
}

/* Top tool layout */
.ci-top-tool {
    width: 100%;
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 15px;
    align-items: stretch;
    margin-top: 10px;
    margin-bottom: 25px;
}

.ci-input-section {
    width: 100%;
    margin: 0;
}

.ci-input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    color: #333333;
    font-weight: 600;
    text-align: center;
}

.ci-textarea {
    width: 100%;
    height: 95px;
    min-height: 80px;
    border: 4px solid #ccc;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 8px;
    font-size: 42px;
    line-height: 1.2;
    resize: none;
    box-sizing: border-box;
    margin-bottom: 8px;
    transition: border-color 0.3s;
    text-align: center;
    overflow: hidden;
}

.ci-textarea:hover {
    border-color: #A9A9A9;
}

.ci-textarea:focus {
    outline: none;
    border-color: black;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.2);
}

/* Main result */
.ci-main-result {
    width: 100%;
    min-height: 126px;
    border: 1px solid #cccccc;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    padding: 14px 12px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ci-character-preview {
    font-size: 56px;
    line-height: 1.15;
    color: #1a73e8;
    font-weight: 700;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}

.ci-character-description {
    font-size: 20px;
    color: #333333;
    margin-top: 8px;
    line-height: 1.4;
    font-weight: 600;
    word-break: break-word;
}

/* Result section */
.ci-result-section {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
}

.ci-result-section h2 {
    text-align: center;
    margin-bottom: 15px;
}

/* Detail cards */
.ci-details-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ci-detail-card {
    border: 1px solid #cccccc;
    background-color: #ffffff;
    padding: 12px 10px;
    box-sizing: border-box;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.ci-detail-label {
    margin-bottom: 6px;
    font-size: 15px;
    color: #333333;
    font-weight: 600;
}

.ci-detail-value {
    font-size: 19px;
    color: #1a73e8;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.4;
}

#ci-description,
#ci-unicodeName,
#ci-binaryValue {
    font-size: 17px;
}

/* Message */
.ci-message-section {
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
}

.ci-message {
    text-align: center;
    font-size: 16px;
    color: #333333;
    font-weight: 500;
    margin: 0;
}

/* Optional button style for future buttons */
.ci-button {
    padding: 16px;
    background-color: #1d7b1e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    display: inline-block;
    margin: 0 0 0 auto;
}

.ci-button:hover {
    background-color: #45a049;
}

.info-icon {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #1A73E8;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.info-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

@media (min-width: 1200px) {
    .div3-vowel { 
        max-width: 900px;
    }
}

@media (max-width: 1200px) {
    .parent-vowel {
        display: grid;
        grid-template-columns: 1fr 300px;
        grid-template-rows: 1fr;
        grid-column-gap: 2px;
        grid-row-gap: 2px;
    }

    .div1-vowel { 
        display: none;
    }

    .div2-vowel { 
        display: none;
    }

    .div3-vowel { 
        grid-area: 1 / 1 / 2 / 2; 
    }

    .sidebar { 
        grid-area: 1 / 2 / 2 / 3;
    }
}

/* 992px */
@media (max-width: 992px) {
    .parent-vowel {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: 1fr;
        grid-column-gap: 0;
        grid-row-gap: 0;
    }

    .div3-vowel { 
        grid-area: 1 / 1 / 2 / 2; 
    }

    .sidebar {
        display: none;
    }

    .ci-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .ci-top-tool {
        grid-template-columns: 1fr;
    }

    .ci-input-section {
        max-width: 260px;
        margin-left: auto;
        margin-right: auto;
    }

    .ci-main-result {
        min-height: 130px;
    }
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .ci-container {
        padding: 15px;
    }

    .ci-title {
        font-size: 30px;
    }

    .ci-intro {
        font-size: 16px;
    }

    .ci-input-label {
        font-size: 16px;
    }

    .ci-textarea {
        height: 90px;
        min-height: 80px;
        font-size: 36px;
    }

    .ci-character-preview {
        font-size: 48px;
        min-height: 56px;
    }

    .ci-character-description {
        font-size: 17px;
    }

    .ci-details-grid {
        grid-template-columns: 1fr;
    }

    .ci-detail-card,
    .ci-main-result {
        box-shadow: none !important;
    }

    .ci-detail-value {
        font-size: 18px;
    }

    #ci-description,
    #ci-unicodeName,
    #ci-binaryValue {
        font-size: 16px;
    }

    .remove-middle-border > div::after {
        box-shadow: none !important;
    }

    .remove-middle-border > div {
        box-shadow: none !important;
    }
}

@media (max-width: 400px) {
    .ci-container {
        padding: 10px;
    }

    .ci-input-section {
        max-width: 220px;
    }

    .ci-textarea {
        height: 82px;
        min-height: 75px;
        font-size: 32px;
    }

    .text {
        padding: 5px;
    }

    .ci-character-preview {
        font-size: 42px;
        min-height: 50px;
    }

    .ci-character-description {
        font-size: 16px;
    }

    .ci-detail-label {
        font-size: 14px;
    }

    .ci-detail-value {
        font-size: 17px;
    }

    #ci-description,
    #ci-unicodeName,
    #ci-binaryValue {
        font-size: 15px;
    }
}

/* Final hamburger menu override */
@media screen and (max-width: 1024px) {
    body #menu {
        position: fixed !important;
        top: 70px !important;
        left: auto !important;
        right: -280px !important;
        transform: none !important;
        translate: none !important;
        width: 260px !important;
        height: auto !important;
        max-height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
        background-color: #ffffff !important;
        box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.18) !important;
        z-index: 999999 !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        padding: 20px 0 !important;
        transition: right 0.3s ease !important;
    }

    body #menu.activated,
    body #menu.active,
    body #menu.show-menu {
        right: 0 !important;
        left: auto !important;
        transform: none !important;
        translate: none !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    body #menu .list {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
        list-style: none !important;
    }

    body #menu .list-item {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body #menu .list-link {
        display: block !important;
        width: 100% !important;
        padding: 15px 20px !important;
        color: #333333 !important;
        background-color: #ffffff !important;
        border-bottom: 1px solid #eeeeee !important;
        text-decoration: none !important;
        font-size: 16px !important;
    }

    body #menu .list-link:hover {
        background-color: #f5f5f5 !important;
    }

    .menu-toggle-icon {
        cursor: pointer !important;
        z-index: 1000000 !important;
        position: relative !important;
    }

    .menu-toggle-icon .close-menu-icon {
        display: none !important;
    }

    .menu-toggle-icon.activated .open-menu-icon,
    .menu-toggle-icon.active .open-menu-icon {
        display: none !important;
    }

    .menu-toggle-icon.activated .close-menu-icon,
    .menu-toggle-icon.active .close-menu-icon {
        display: block !important;
    }
}