/* Base Themes */
:root, html[data-theme="minimalism"] {
    --bg-color: #f0dcdc;
    --text-color: #000000;
    --header-bg: #ffffff;
    --border-style: 3px solid #000000;
    --shadow-style: 4px 4px 0px #000000;
    --accent-color: #ffde4d;
    --danger-color: #ff4d4d;
    --font-family: 'Courier New', Courier, monospace;
}

html[data-theme="blackwhite"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --header-bg: #121212;
    --border-style: 2px solid #ffffff;
    --shadow-style: none;
    --accent-color: #ffffff;
    --danger-color: #ffffff;
    --font-family: sans-serif;
}

html[data-theme="pastel"] {
    --bg-color: #fcd6e1;
    --text-color: #4a3e3d;
    --header-bg: #ffffff;
    --border-style: 1px solid #e6dcd3;
    --shadow-style: 0 4px 10px rgba(0,0,0,0.03);
    --accent-color: #ffd3b6;
    --danger-color: #ffaaa5;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Perfect Cross-Device Sticky Header Layout */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--header-bg);
    border-bottom: var(--border-style);
    box-shadow: var(--shadow-style);
    width: 100%;
    padding: 0.75rem 1rem;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap; /* Wraps clean on small screens instead of overflowing */
}

.header-brand {
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1.2;
    min-width: 100px;
}

.header-nav {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap; /* Allows buttons to re-align neatly on smaller frames */
    justify-content: center;
    flex: 1;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Consistent Uniform Button Layout styling */
.nav-btn, .action-btn {
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--header-bg);
    padding: 0.6rem 1rem;
    border: var(--border-style);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.nav-btn:hover, .action-btn:hover {
    background-color: var(--accent-color);
    color: #000000;
}

.error-btn:hover {
    background-color: var(--danger-color);
    color: #ffffff;
}

#app-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* Mobile Devices Optimization Rules */
@media (max-width: 600px) {
    .header-container {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .header-nav, .header-actions {
        justify-content: center;
        width: 100%;
    }
    .nav-btn, .action-btn {
        flex: 1;
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}



/*inside the theme dropdoewn*/

/* Theme Dropdown Positioning Context */
.theme-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Secure Dropdown Menu Container */
.theme-menu-content {
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background-color: var(--header-bg);
    border: var(--border-style);
    box-shadow: var(--shadow-style);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
    min-width: 160px;
}

/* Helper Class to Toggle Display State Safely */
.theme-menu-content.hidden {
    display: none !important;
}

/* Individual Theme Menu Options */
.theme-menu-item {
    background-color: var(--header-bg);
    color: var(--text-color);
    border: var(--border-style);
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background-color 0.1s ease;
}

.theme-menu-item:hover {
    background-color: var(--accent-color);
    color: #000000;
}

/* Active Check Indicator styling */
.theme-menu-item.active-theme {
    background-color: var(--text-color);
    color: var(--header-bg);
}


