/* --- Font Definition --- */
@font-face {
    font-family: 'AppleSDGothicNeo';
    src: url('assets/fonts/AppleSDGothicNeoB.ttf') format('truetype');
    font-weight: normal;
}

/* --- Global Styles --- */
* {
    font-family: 'AppleSDGothicNeo' !important;
}

body {
    font-family: 'AppleSDGothicNeo', sans-serif;
    text-align: center;
    background-color: white; /* Changed from #f4f4f4 */
    margin: 0;
    padding-top: 50px;
}

/* --- Header & Page Title --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: white; /* Changed to white */
    border-bottom: 1px solid #ddd;
    padding: 0 15px; /* Slightly less padding on mobile */
    box-sizing: border-box;
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Slightly smaller on mobile */
}

.header-content {
    display: flex;
    flex-direction: column; /* Stack title and subtitle vertically on mobile */
    align-items: flex-start;
    justify-content: center;
    gap: 2px; /* Small gap between title and subtitle */
    flex: 1;
    min-width: 0;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 12px; /* Smaller gap on mobile */
    flex-shrink: 0; /* Prevent icons from shrinking */
}

.header-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn img {
    width: 22px; /* Slightly smaller icons on mobile */
    height: 22px;
    object-fit: contain;
    transition: transform 0.2s;
}

.header-btn:hover img {
    transform: scale(1.1);
}

#page-title {
    font-size: 20px; /* Smaller title for mobile */
    font-weight: bold;
    background: linear-gradient(90deg,
            #0047ff,
            #8b00ff,
            #ff0000);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-align: left;
    animation: rainbowText 4s linear infinite;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Truncate if too long */
}

#page-subtitle {
    font-size: 12px;
    color: #666;
    margin: 0;
    font-weight: normal;
    white-space: nowrap;
    display: none; /* Hide subtitle on very small screens if needed, or keep it */
}

/* Show subtitle on slightly larger mobile screens */
@media screen and (min-width: 360px) {
    #page-subtitle {
        display: block;
    }
}

@keyframes rainbowText {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* --- Responsive Adjustments for Header & Title (Desktop) --- */
@media screen and (min-width: 1024px) {
    .header-content {
        flex-direction: row; /* Side-by-side on desktop */
        align-items: center; /* Center vertically */
        justify-content: flex-start; /* Align to left */
        gap: 20px;
    }

    #page-title {
        font-size: 48px;
        padding: 0;
        line-height: 1.2;
    }

    #page-subtitle {
        font-size: 24px;
        height: auto;
        display: block;
    }

    header {
        padding: 0 60px; /* Increased padding */
        height: 100px; /* Increased height (2x of 70px) */
    }

    .header-icons {
        gap: 24px;
        align-items: center; /* Ensure icons are vertically centered */
    }

    .header-btn img {
        width: 42px;
        height: 42px;
    }

    /* Adjust specific icons on PC */
    .lang-btn img {
        width: 32px !important;
        height: 32px !important;
    }

    #dark-mode-btn img {
        width: 36px !important;
        height: 36px !important;
    }
}

/* --- Light Mode Card Styles (Background White) --- */
.card {
    background-color: white;
    border: 1px solid #ddd;
}

.home-button {
    /* If used */
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

a {
    text-decoration: none;
    color: black;
}

/* --- News Card Layout & Styling --- */
#card-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

@media screen and (min-width: 1024px) {
    #card-container {
        /* 
           Header height is 140px. 
           Body padding-top is 50px.
           Total offset needed = 140px.
           Margin-top = 140px - 50px = 90px.
        */
        margin-top: 95px;
    }
}

.card {
    position: relative;
    width: 100%; /* Changed to 100% to fit container */
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: left;
}

@media screen and (min-width: 1024px) {
    .card:hover {
        transform: scale(1.08);
        box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25);
        transition: transform 1.0s ease, box-shadow 1.0s ease;
    }
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-video {
    /* For embedded videos like Reddit */
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.reddit-embed-bq {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 22px;
    margin: 0;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

.card-link {
    text-decoration: none;
    color: inherit;
}

/* --- Tag Styling --- */
.tag-container {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    color: white;
    cursor: pointer;
    border: 2px solid;
    transition: background 0.3s, border-color 0.3s;
}

.tag:hover {
    opacity: 0.8;
}

.published-date {
    margin-left: auto;
    font-size: 12px;
    color: #888;
}

/* --- Tag-Specific Background Colors --- */
.tag[data-category="#device"] {
    background: #FFC107;
}

.tag[data-category="#3D reconstruction"] {
    background: #1E90FF;
}

.tag[data-category="#3D localization"] {
    background: #61acf7;
}

.tag[data-category="#mesh generation"] {
    background: #3984cf;
}

.tag[data-category="#volumetric media"] {
    background: #1059a3;
}

.tag[data-category="#digital twin"] {
    background: #2d6aa7;
}

.tag[data-category="#pose estimation"] {
    background: #20C997;
}

.tag[data-category="#interaction-UX"] {
    background: #008000;
}

.tag[data-category="#avatar"] {
    background: #17A2B8;
}

.tag[data-category="#rendering"] {
    background: #FF69B4;
}

.tag[data-category="#neural rendering"] {
    background: #012af8;
}

.tag[data-category="#emotion"] {
    background: #E91E63;
}

.tag[data-category="#cognition"] {
    background: #FF8C00;
}

.tag[data-category="#biosignal"] {
    background: #6610F2;
}

.tag[data-category="#sensory"] {
    background: #a8a615;
}

.tag[data-category="#behavior"] {
    background: #0056b3;
}

.tag[data-category="#haptic-wearable"] {
    background: #eaaa44;
}

.tag[data-category="#BCI"] {
    background: #A52A2A;
}

.tag[data-category="#agent"] {
    background: #5a7bf3;
}

.tag[data-category="#development"] {
    background: #17A2B8;
}

.tag[data-category="#tool"] {
    background: #cd6be3;
}

.tag[data-category="#webXR"] {
    background: #5c7a16;
}

.tag[data-category="#standardization"] {
    background: #2b5b74;
}

.tag[data-category="#patent"] {
    background: #4bbace;
}

.tag[data-category="#MR apps"] {
    background: #FF5733;
}

.tag[data-category="#VR apps"] {
    background: #FF1493;
}

.tag[data-category="#metaverse"] {
    background: #6F42C1;
}

.tag[data-category="#social XR"] {
    background: #6610F2;
}

.tag[data-category="#remote collaboration"] {
    background: #492681;
}

.tag[data-category="#medical"] {
    background: #28A745;
}

.tag[data-category="#education"] {
    background: #e7ca54;
}

.tag[data-category="#training"] {
    background: #007BFF;
}

.tag[data-category="#simulator"] {
    background: #328b80;
}

.tag[data-category="#defense"] {
    background: #264738;
}
.tag[data-category="#game"] {
    background: #E91E63;
}

.tag[data-category="#sports"] {
    background: #4ad2eb;
}

.tag[data-category="#entertainment"] {
    background: #FF007F;
}

.tag[data-category="#art-culture"] {
    background: #ac77e1;
}

.tag[data-category="#smart home"] {
    background: #FF8C00;
}

.tag[data-category="#government"] {
    background: #242125;
}

.tag[data-category="#company"] {
    background: #FF4500;
}

.tag[data-category="#market"] {
    background: #e2a2f1;
}

.tag[data-category="#issue-column"] {
    background: #584727;
}

.tag[data-category="#trend"] {
    background: #3434d4;
}

.tag[data-category="#review"] {
    background: #505050;
}

.tag[data-category="#AI"] {
    background: #9400D3;
}

.tag[data-category="#generative AI"] {
    background: #b327f0;
}

.tag[data-category="#geo AI"] {
    background: #8b3aad;
}

.tag[data-category="#physical AI"] {
    background: #780ea5;
}

.tag[data-category="#display"] {
    background: #9fbe57;
}

.tag[data-category="#audio"] {
    background: #213ea0
}

.tag[data-category="#robot"] {
    background: #4682B4;
}

.tag[data-category="#network"] {
    background: #6abef5;
}

.tag[data-category="#More ICT"] {
    background: #FF5733;
}


/* --- Theme Label on Cards --- */
.theme-label {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

@media screen and (max-width: 768px) {
    .theme-label {
        top: 0px; /* Move up more on mobile as requested (negative value pulls it up) */
    }
}

.theme-etri {
    /* Specific theme image styling */
    width: 16px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}

/* --- Admin/News Entry Form Styling --- */
.news-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.url-input {
    flex: 2;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.tag-select {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.remove-news-btn {
    background: red;
    color: white;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
}

#add-news-btn,
#submit-news {
    margin-top: 10px;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#add-news-btn:hover,
#submit-news:hover {
    background-color: #0056b3;
}

/* --- "Load More" & "Back to Main" Button/Link Styling --- */
.load-more-btn {
    display: block;
    margin: 70px auto 0;
    padding: 10px 40px;
    background-color: transparent; /* Remove background color */
    color: #333; /* Dark text */
    border: 1px solid #ccc; /* Visible boundary */
    cursor: pointer;
    border-radius: 25px; /* Round pill shape */
    font-size: 16px;
    text-align: center;
    transition: all 0.2s ease;
}

body.dark-mode .load-more-btn {
    color: #eee;
    border-color: #555;
}

.load-more-btn:hover {
    background-color: #f5f5f5; /* Light hover effect */
    border-color: #bbb;
}
body.dark-mode .load-more-btn:hover {
    background-color: #333;
    border-color: #777;
}

.back-to-main {
    text-align: center;
    margin-top: 30px;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 40px;
}

.back-to-main a {
    text-decoration: none;
    color: #8b00ff;
}

.back-to-main a:hover {
    text-decoration: underline;
}

/* --- Hamburger Menu & Side Menu Styling --- */
/* Buttons are now handled by .header-icons and .header-btn in the header section */

.side-menu {
    display: none; /* Completely hide side menu */
}

.menu-content {
    display: none;
}

.input-field {
    /* Used within modals */
    padding: 8px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#close-button {
    /* If used */
    font-size: 20px;
    background: none;
    border: none;
    cursor: pointer;
    align-self: flex-end;
}

.section-title {
    /* Used within side menu */
    font-size: 16px;
    font-weight: bold;
    margin: 20px 0 0px 0;
    text-align: left;
}

/* --- Animation Styling --- */
.thumbsup {
    /* Thumbs up feedback animation */
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(160px, 40vw, 320px);
    animation: floatUpBig 4.0s ease-out forwards;
    z-index: 2000;
    pointer-events: none;
    opacity: 0.95;
}

@keyframes floatUpBig {
    0% {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    90% {
        opacity: 1;
        transform: translate(-50%, -90vh);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -100vh);
    }
}

/* --- Miscellaneous Utility Styling --- */
#privacy-check+a {
    /* Privacy policy link in side menu */
    color: #007BFF;
    text-decoration: underline;
    margin: 0;
}

.policy-container {
    margin: 1px 0;
    text-align: left;
}

.policy-container label {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.policy-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 6px;
}

/* --- Footer Styling --- */
.site-footer {
    padding: 60px 20px;
    text-align: center;
    font-size: 14px;
    color: black; /* Black text on white */
    border-top: 1px solid #ddd; /* Light border top */
    background-color: white; /* White background */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-site-name {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: black;
}

.footer-description {
    font-size: 15px;
    color: #666;
    margin: 0;
    max-width: 600px;
    line-height: 1.6;
    font-weight: normal;
}

.footer-copyright {
    font-size: 12px;
    color: #999;
    margin-top: 10px;
    opacity: 0.8;
}

@media screen and (max-width: 768px) {
    .site-footer {
        padding: 40px 20px;
    }
    .footer-site-name {
        font-size: 20px;
    }
    .footer-description {
        font-size: 14px;
    }
}

/* --- Subscribe Button Style --- */
.btn-subscribe {
    background-color: #a29bfe; /* Reverted to light purple */
    color: white; /* White text */
    border: none;
    border-radius: 25px;
    padding: 10px 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-subscribe:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

/* Header Subscribe Button Desktop */
@media screen and (min-width: 1024px) {
    #subscribe-trigger-btn {
        background-color: #a29bfe;
        color: white;
        border-radius: 25px;
        padding: 8px 20px;
        height: auto;
        width: auto;
        transition: background-color 0.3s, transform 0.2s;
    }

    #subscribe-trigger-btn:hover {
        background-color: #6c5ce7;
        transform: scale(1.05);
    }

    #subscribe-trigger-btn img {
        display: none;
    }

    #subscribe-trigger-btn::after {
        content: "Subscribe";
        font-size: 15px;
        font-weight: bold;
    }
}

/* --- Dark Mode Toggle Switch --- */
.dark-mode-icon {
    display: flex;
    align-items: center;
    margin-right: 8px;
    font-size: 18px;
    line-height: 20px;
}

.dark-mode-toggle {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: -15px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #666;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* --- Dark Mode Theme Styles --- */
body.dark-mode {
    background-color: black;
    color: white;
}

body.dark-mode header {
    background-color: black; /* Changed to black */
    border-bottom: 1px solid #777;
    color: white; /* Ensure header text is visible? Or keep original icon colors */
}

/* Ensure icons/text in header are compatible with purple bg in dark mode */
body.dark-mode #page-title {
    /* Title has gradient, might look ok. */
}

body.dark-mode #home-button {
    color: white;
}

body.dark-mode #menu-button {
    color: white;
}

body.dark-mode .side-menu {
    background-color: black;
}

body.dark-mode .card {
    background-color: black; 
    border: 1px solid #333; 
}

body.dark-mode .card-content h3 {
    color: white; 
}

body.dark-mode .card-footer {
    border-top: 1px solid #333;
    color: #ccc;
}

body.dark-mode .menu-content,
body.dark-mode .section-title {
    color: white;
}

body.dark-mode .tag {
    border-color: #383838;
}

body.dark-mode .input-field {
    border: 1px solid #555;
}

body.dark-mode hr {
    border-color: #333;
}

body.dark-mode .site-footer {
    background-color: black; /* Changed to black */
    border-top-color: #333;
    color: white; /* White text */
}

body.dark-mode .footer-site-name {
    color: white;
}

body.dark-mode .footer-description {
    color: white;
}

body.dark-mode .btn-subscribe,
body.dark-mode #subscribe-trigger-btn {
    background-color: #a29bfe; /* Purple button */
    color: white; /* White text */
}

body.dark-mode .btn-subscribe:hover,
body.dark-mode #subscribe-trigger-btn:hover {
    background-color: #8e88e8;
}

/* --- Search bar inline & icon button --- */
.search-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-input {
    flex: 1;
}

.icon-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
}


/* --- Header Dropdown (Language) --- */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    /* Adjust size to match other header icons */
    width: 22px; 
    height: 22px;
}
.lang-btn img {
    /* Style for svg inside */
    width: 22px; 
    height: 22px;
    object-fit: contain;
    transition: transform 0.2s;
}

.lang-btn:hover img {
    transform: scale(1.1);
}
/* Font Awesome styles removal */
/* .lang-btn i { ... } removed */ 
/* body.dark-mode .lang-btn i { ... } removed */


.lang-content {
    display: none;
    position: absolute;
    top: 100%; /* Below button */
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px; /* Space from button */
    background-color: white;
    min-width: 60px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    border-radius: 4px;
    border: 1px solid #ddd;
    text-align: center;
    padding: 5px 0;
}

/* Arrow for Tooltip Effect (Optional) */
.lang-content::after {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}
body.dark-mode .lang-content::after {
    border-color: transparent transparent #333 transparent;
}

body.dark-mode .lang-content {
    background-color: #333;
    border-color: #555;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
}

.lang-content a {
    color: black;
    padding: 8px 10px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: bold;
}

body.dark-mode .lang-content a {
    color: white;
}

.lang-content a:hover {
    background-color: #f1f1f1;
}

body.dark-mode .lang-content a:hover {
    background-color: #555;
}

.lang-dropdown:hover .lang-content {
    display: block;
}

/* --- Modal Styling --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: white;
    padding: 30px;
    border-ra20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 20px;
}

.modal-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-search-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#modal-search-input {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#modal-search-btn {
    padding: 8px 15px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
}

/* Subscribe Modal Specifics */
.modal-subscribe-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Report Modal Specifics */
.modal-report-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.button {
    padding: 10px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
}

.button:hover {
    background-color: #0056b3;
}

.subscribe-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
}

.button.secondary {
    background-color: #6c757d;
}

.button.secondary:hover {
    background-color: #5a6268;
}

/* Dark mode for modal */
body.dark-mode .modal-content {
    background-color: #383838;
    color: #e0e0e0;
}

body.dark-mode .modal-content p {
    color: #aaa;
}

body.dark-mode #modal-search-input,
body.dark-mode #user-email {
    background-color: #222;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .close-modal-btn {
    color: #e0e0e0;
}

body.dark-mode #search-trigger-btn,
body.dark-mode #subscribe-trigger-btn,
body.dark-mode #report-trigger-btn,
body.dark-mode #dark-mode-btn {
    color: #e0e0e0;
}


body.dark-mode .header-btn .lang-icon-img {
    filter: invert(1);
    width: 100%; /* Ensure it fills container */
    height: 100%;
}

/* Invert icons in dark mode to make them white */
body.dark-mode .header-btn img {
    filter: invert(1);
}

body.dark-mode #page-subtitle {
    color: #e0e0e0;
}

/* --- Mobile Header Fixes (Task 1) --- */
@media screen and (max-width: 768px) {
    header {
        padding: 0 10px; /* Reduce padding to give more space */
    }
    .header-icons {
        gap: 8px; /* Tighter icons */
        flex-shrink: 0;
    }
    .header-content {
        flex: 1;
        min-width: 0; /* Allow shrinking */
        margin-right: 5px;
    }
    #page-title {
        font-size: 18px; /* Ensure title fits */
    }
    /* Ensure icons don't disappear */
    .header-btn {
        display: flex !important;
        visibility: visible !important;
    }
}