:root {
    --bg-color: #000000;
    --header-bg: #1a1a1a;
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-color-alt: #aaa;
    --border-color: #333;
    --title-color: #e0d0ff;
    --btn-bg: #6a4a8a;
    --btn-hover: #8a6a9a;
    --fav-color: #ff6b6b;
}
body.light-mode {
    --bg-color: #f4f4f4;
    --header-bg: #ffffff;
    --card-bg: #ffffff;
    --text-color: #000000;
    --text-color-alt: #555;
    --border-color: #ddd;
    --title-color: #6a4a8a;
    --btn-bg: #9050ff;
    --btn-hover: #a070ff;
    --fav-color: #e04b4b;
}
body.theme-forest {
    --bg-color: #1a2a1a;
    --header-bg: #2a3a2a;
    --card-bg: #2a3a2a;
    --text-color: #e0ffe0;
    --text-color-alt: #90c090;
    --border-color: #4a6a4a;
    --title-color: #a0f0a0;
    --btn-bg: #4a8a4a;
    --btn-hover: #6a9a6a;
    --fav-color: #ff6b6b;
}
body.theme-ocean {
    --bg-color: #102030;
    --header-bg: #1a2a4a;
    --card-bg: #1a2a4a;
    --text-color: #e0f0ff;
    --text-color-alt: #90b0d0;
    --border-color: #3a5a7a;
    --title-color: #a0d0ff;
    --btn-bg: #3a7a9a;
    --btn-hover: #5a9ab0;
    --fav-color: #ff6b6b;
}
body.theme-custom {
    /* Injected by features.js */
}

body, html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Splash Page Styles */
body.splash-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    overflow: hidden;
}
.splash-container {
    animation: fadeIn 1.5s ease-out;
}
.splash-title {
    font-size: 6rem;
    color: var(--title-color);
    margin: 0 0 10px 0;
    animation: glow 3s ease-in-out infinite;
}
.splash-subtitle {
    font-size: 1.5rem;
    color: var(--text-color-alt);
    margin: 0 0 40px 0;
}
.splash-enter-btn {
    display: inline-block;
    background-color: var(--btn-bg);
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
    padding: 15px 40px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}
.splash-enter-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(106, 74, 138, 0.4);
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
/* End Splash Page Styles */

/* PIN Modal Styles */
#pin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#pin-modal.show {
    opacity: 1;
    visibility: visible;
}
#pin-modal .modal-content {
    transform: scale(1);
}
#pin-input {
    width: 100%;
    padding: 15px;
    font-size: 2rem;
    text-align: center;
    letter-spacing: 10px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    box-sizing: border-box;
    margin-bottom: 20px;
}
#pin-error-msg {
    color: var(--fav-color);
    display: none;
    margin-top: -10px;
    margin-bottom: 15px;
}
#pin-forgot-btn {
    background: none;
    border: none;
    color: var(--text-color-alt);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px;
}
#pin-forgot-btn:hover {
    color: var(--text-color);
}
/* End PIN Modal Styles */


header {
    background-color: var(--header-bg);
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
    z-index: 10;
}
header.scrolled {
    padding: 10px 30px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}
.header-nav {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
}
.nav-link {
    color: var(--text-color-alt);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.nav-link:hover {
    color: var(--text-color);
    background-color: var(--border-color);
}
.nav-link.active {
    color: var(--title-color);
    background-color: rgba(106, 74, 138, 0.3); 
}

/* NEW: Tools Dropdown Styles */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    z-index: 100;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}
.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}
.nav-dropdown-content .nav-link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
}
.nav-dropdown-content .nav-link:hover {
    background-color: var(--border-color);
}
/* End Tools Dropdown */

header h1 {
    font-size: 2.5rem;
    color: var(--title-color);
    margin: 0;
    animation: glow 3s ease-in-out infinite;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: font-size 0.3s ease;
}
header.scrolled h1 {
    font-size: 2rem;
}

@keyframes glow {
    0% { text-shadow: 0 0 5px var(--title-color); }
    50% { text-shadow: 0 0 20px rgba(224, 208, 255, 0.7); }
    100% { text-shadow: 0 0 5px var(--title-color); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

#live-clock {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-color-alt);
    background-color: var(--bg-color);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
header.scrolled #live-clock {
    padding: 5px 10px;
    font-size: 1rem;
}

#settings-btn {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}
header.scrolled #settings-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
}
#settings-btn:hover {
    border-color: var(--title-color);
    color: var(--title-color);
}
main {
    flex-grow: 1;
    padding: 40px 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hub-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}
.hub-search-bar {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    font-size: 1.1rem;
    color: var(--text-color);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    margin-bottom: 0;
}
.control-btn, #sort-select {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 15px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}
#sort-select {
    font-size: 1rem;
    padding-right: 40px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}
#sort-select:focus {
     outline: none;
     border-color: var(--title-color);
     box-shadow: 0 0 10px rgba(180, 130, 255, 0.2);
}
.control-btn:hover, #sort-select:hover {
    background-color: var(--btn-hover);
}
.view-controls {
    display: flex;
    gap: 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}
.view-btn {
    background-color: transparent;
    color: var(--text-color-alt);
    border: none;
    padding: 13px 18px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.view-btn:hover {
    color: var(--text-color);
    background-color: var(--border-color);
}
.view-btn.active {
    background-color: var(--btn-bg);
    color: white;
}
.view-btn:first-child {
    border-right: 2px solid var(--border-color);
}
#category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}
.category-btn {
    background-color: var(--card-bg);
    color: var(--text-color-alt);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.2s ease;
}
.category-btn:hover {
    background-color: var(--border-color);
    color: var(--text-color);
}
.category-btn.active {
    background-color: var(--btn-bg);
    color: white;
    border-color: var(--btn-bg);
}
#game-count {
    color: var(--text-color-alt);
    font-size: 1.1rem;
    margin-bottom: 35px;
}
#no-results-message {
    display: none;
    color: #888;
    font-size: 1.2rem;
    font-style: italic;
    margin-top: 40px;
}
#clear-search-btn {
    display: none;
    margin-left: 10px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}
.game-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;    
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
}
.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(180, 130, 255, 0.2);
    border-color: var(--title-color);
}
.game-card.selected {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 30px var(--title-color);
    border-color: var(--title-color);
}
.card-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}
.card-loader.show {
    opacity: 1;
    visibility: visible;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--title-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
body.hide-new-badges .new-badge {
    display: none;
}
.new-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff5050;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    z-index: 2;
    user-select: none;
}
.image-wrapper {
    overflow: hidden;
    display: block;
    cursor: pointer;
}
.game-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #333;    
    background-color: #333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.lazy-image { opacity: 0; }
.lazy-image.loaded { opacity: 1; }
.game-card:hover img { transform: scale(1.05); }
.card-content {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-content h3 {
    font-size: 1.25rem;
    color: var(--text-color);
    user-select: none;
    margin: 0;
    transition: color 0.3s ease;
    cursor: pointer;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-content h3 mark {
    background-color: var(--title-color);
    color: var(--bg-color);
    padding: 0 2px;
    border-radius: 2px;
}
.card-content h3:hover {
    color: var(--title-color);
}
.card-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-left: 10px;
}
.card-icon-btn {
    background: none;
    border: none;
    color: var(--text-color-alt);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}
.card-icon-btn:hover {
    color: var(--text-color);
    transform: scale(1.1);
}
.fav-btn.favorited {
    color: var(--fav-color);
}
.remove-btn {
    color: var(--fav-color);
    font-size: 1.2rem;
}
.remove-btn:hover {
    color: red;
}
.copy-btn {
    font-size: 1.2rem;
    position: relative;
}
.copy-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.copy-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.game-grid.list-view {
    grid-template-columns: 1fr; 
    gap: 10px; 
}
.game-card.list-item {
    display: flex; 
    align-items: center;
    overflow: visible; 
}
.game-card.list-item .image-wrapper {
    width: 160px; 
    height: 90px;
    flex-shrink: 0;
    cursor: pointer;
}
.game-card.list-item img {
    border-radius: 8px; 
    border-bottom: none; 
    height: 100%;
}
.game-card.list-item .new-badge {
    left: auto;
    right: 10px; 
}
.game-card.list-item .card-content {
    flex-grow: 1;
    padding: 10px 20px;
}
.game-card.list-item .card-content h3 {
    font-size: 1.3rem; 
}
#game-container {
    width: 100%;
    height: 100vh;    
    display: flex;
    flex-direction: column;
    background: #000;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}
.game-controls {
    background-color: #111;    
    padding: 10px 20px;
    display: flex;
    gap: 15px;
    flex-shrink: 0;
    align-items: center;
}
.game-controls button {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 12px 22px;    
    border-radius: 8px;    
    cursor: pointer;
    font-size: 1.1rem;    
    font-weight: bold;    
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}
.game-controls button:hover {
    background-color: var(--btn-hover);
}
#now-playing-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #eee;
    margin: 0;
    margin-right: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
#game-frame {
    flex-grow: 1;    
    border: none;
    width: 100%;
    height: 100%;
}
footer {
    background-color: #111;
    color: #777;
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid #333;
    flex-shrink: 0;
}
footer a {
    color: var(--text-color-alt);
    text-decoration: none;
}
footer a:hover {
    color: var(--title-color);
    text-decoration: underline;
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--btn-bg);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
}
#back-to-top:hover {
    background-color: var(--btn-hover);
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}
#info-modal, #settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#info-modal.show, #settings-modal.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}
#info-modal.show .modal-content, #settings-modal.show .modal-content {
    transform: scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}
.modal-title {
    margin: 0;
    color: var(--text-color);
    font-size: 1.8rem;
}
.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-color-alt);
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.modal-close-btn:hover {
    color: var(--text-color);
}
#info-modal-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
}
.info-field {
    margin-top: 15px;
}
.info-field strong {
    color: var(--text-color-alt);
    font-size: 0.9rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}
.info-field p {
    color: var(--text-color);
    font-size: 1rem;
    margin: 0;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 70vh;
    overflow-y: auto;
}
.setting-field {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
.setting-field label {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
}
.setting-field.toggle {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: var(--bg-color);
    border-radius: 6px;
}
.setting-field.toggle label {
    margin: 0;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: .4s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--btn-bg);
}
input:checked + .slider:before {
    transform: translateX(22px);
}

.setting-field input[type="text"],
.setting-field input[type="password"],
.setting-field select {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
}

#custom-favicon-field {
    display: none;
}
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}
.modal-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.modal-btn.primary {
    background-color: var(--btn-bg);
    color: white;
}
.modal-btn.primary:hover {
    background-color: var(--btn-hover);
}
.modal-btn.secondary {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color-alt);
}
.modal-btn.secondary:hover {
    background-color: var(--border-color);
}
.modal-btn.danger {
    background-color: #5a1a1a;
    color: #ffc2c2;
    margin-right: auto;
}
.modal-btn.danger:hover {
    background-color: #7a2a2a;
}
.hidden {
    display: none !important;
}
.setting-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}
.import-export-btns {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}
.import-export-btns .modal-btn {
    flex-grow: 1;
}
#import-file-input {
    display: none;
}

/* Custom Theme Editor Styles */
#custom-theme-editor {
    display: none;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    margin-top: 5px;
}
.theme-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.color-picker-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.color-picker-wrapper label {
    font-size: 0.9rem;
    color: var(--text-color-alt);
}
.color-picker-wrapper input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
input[type="color"]::-webkit-color-swatch {
    border: 1px solid var(--border-color);
    border-radius: 6px;
}
#reset-custom-theme-btn {
    margin-top: 15px;
}
/* End Theme Editor Styles */

/* "Link Hub" Page Form Styles */
.custom-item-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 800px;
    margin: 0 auto 40px auto;
    padding: 25px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}
.custom-item-form h2 {
    margin: 0 0 10px 0;
    color: var(--title-color);
    text-align: left;
}
.custom-item-form .setting-field {
    gap: 5px;
}
.custom-item-form .modal-btn {
    margin-top: 10px;
}
/* End "Link Hub" Page Styles */

/* Tool Page Styles */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-align: left;
}
.tool-container h2 {
    color: var(--title-color);
    margin-top: 0;
}
.tool-container textarea,
.tool-container input[type="text"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    color: var(--text-color);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-sizing: border-box;
    font-family: monospace;
    resize: vertical;
}
.tool-container .modal-btn {
    margin-top: 10px;
}
#image-preview-box {
    width: 100%;
    max-height: 400px;
    margin-top: 15px;
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color-alt);
    overflow: hidden;
}
#image-preview-box img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}
.css-tester-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 60vh;
}
.css-tester-container .setting-field {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.css-tester-container textarea {
    height: 100%;
}
#css-preview-frame {
    width: 100%;
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: white;
}
.bookmarklet-link {
    display: inline-block;
    background-color: var(--btn-bg);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    cursor: grab;
    transition: background-color 0.2s;
}
.bookmarklet-link:hover {
    background-color: var(--btn-hover);
}
/* End Tool Page Styles */