:root {
    --text-color: #ffffff;
    --background: #000000;
    --font: 'HelveticaNeue-Medium';
    --radius: 0.325rem;
    --foreground: oklch(0.9850 0 0);
    --card: #121212;
    --card-foreground: oklch(0.9850 0 0);
    --popover: oklch(0.2690 0 0);
    --popover-foreground: oklch(0.9850 0 0);
    --primary: oklch(0.9220 0 0);
    --primary-foreground: #121212;
    --secondary: oklch(0.2690 0 0);
    --secondary-foreground: oklch(0.488 0.243 264.376);
    --muted: oklch(0.2690 0 0);
    --muted-foreground: oklch(0.7080 0 0);
    --accent: oklch(0.3710 0 0);
    --accent-foreground: oklch(0.9850 0 0);
    --destructive: oklch(0.7040 0.1910 22.2160);
    --destructive-foreground: oklch(0.9850 0 0);
    --border: oklch(0.2750 0 0);
    --input: oklch(0.3250 0 0);
    --ring: oklch(0.5560 0 0);
    --chart-1: oklch(0.8100 0.1000 252);
    --chart-2: oklch(0.6200 0.1900 260);
    --chart-3: oklch(0.5500 0.2200 263);
    --chart-4: oklch(0.4900 0.2200 264);
    --chart-5: oklch(0.4200 0.1800 266);
    --sidebar: #121212;
}



@font-face {
    font-family: 'HelveticaNeue-Medium';
    src: url('../font/HelveticaNeue-Medium.ttf') format('truetype');
    font-weight: bold;

}

.parent {
    background-color: var(--background);
}

.input {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 60vw;
    grid-area: 1 / 2 / 2 / 3;
}

#bar {
    grid-area: 1 / 1 / 2 / 2;
    background-color: var(--sidebar);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr;
    grid-column-gap: 0px;
    grid-row-gap: 0px;
    align-items: center;
    grid-row: 1;
    height: 7vh;
    visibility: hidden;
    transform: translateY(-100%);
    /* Moves the element up by 100% of its own height */
    transition: transform 0.3s ease-in, visibility 0s linear 0.3s;
    opacity: 86%;
}

#bar.is-visible {
    visibility: visible;
    transform: translateY(0);
    transition: transform 0.3s ease-out, visibility 0s linear 0s;
}


.left {
    grid-area: 1 / 1 / 2 / 2;
}

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

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

.menu {
    margin-left: 18px;
}

svg:hover {
    opacity: 50%;
}

svg {
    cursor: pointer;
    color: var(--secondary-foreground);
}

.text {
    text-align: center;
    font-family: var(--font);
    font-size: 300px;
    margin-top: -8.5vh;
    box-sizing: border-box;
    overflow-wrap: break-word;
    min-width: 0;
    padding: 0 24px;
    color: var(--text-color);
}

input {
    caret-color: var(--secondary-foreground)
}

.text-area {
    cursor: pointer;
    height: 93vh;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-wrap: break-word;
}

p,
span,
div {
    color: white;
}


header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #3a3a3a;
}

header button {
    background: none;
    border: none;
    color: #888;
    font-size: 15px;
    cursor: pointer;
}

header button:hover {
    color: #fff;
}

header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

article {
    background-color: var(--sidebar);
}

.preview {
    text-align: center;
    padding: 10px 10px;
    margin-bottom: 2px;
    background: var(--background);
    border-radius: 8px;
}

.preview-text {
    color: var(--text-color);
    font-size: 72px;
    font-weight: 700;
    margin: 0;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #3a3a3a;
    background: #1a1a1a;
    border-radius: 8px;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 15px;
    font-weight: 400;
}

.setting-value {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 15px;
    cursor: pointer;
}

.setting-value:hover {
    color: #fff;
}

.color-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #3a3a3a;
}

.color-indicator:hover {
    transform: scale(1.1);
}

.swap-colors {
    text-align: center;
}

.swap-colors button {
    color: #4a90ff;
    font-size: 13px;
}

.flash-row {
    padding: 9px;
    border-bottom: 1px solid #3a3a3a;
    background: #1a1a1a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.speed-selector {
    display: flex;
    gap: 4px;
    background: #1a1a1a;
    padding-bottom: 4px;
    border-radius: 8px;
    justify-content: center;
    margin: 0 auto;
}

.speed-option {
    font-size: 13px;
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.speed-option.active {
    background: #3a3a3a;
    color: #fff;
}

.speed-option:hover:not(.active) {
    color: #fff;
}

/* Toggle Switch Styling */
input[type="checkbox"] {
    appearance: none;
    width: 51px;
    height: 31px;
    background: #3a3a3a;
    border-radius: 31px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="checkbox"]:checked {
    background: #4a90ff;
}

input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

.chevron {
    color: #858585;
    font-size: 18px;
}

.open-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: #4a90ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
}

/* dialog article header: keep Done / Settings / Reset on one row */
.dialog-article-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 4px 16px;
    box-sizing: border-box;
}

/* center title and style */
.dialog-article-header>h2 {
    margin: 0;
    justify-self: center;
    text-align: center;
    color: white;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
}

/* keep buttons on the same line and flush left/right */
.dialog-article-header>.btn-secondary {
    margin: 0;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
}

/* ensure first/last buttons align to edges of the grid */
.dialog-article-header>.btn-secondary:first-child {
    justify-self: start;
}

.dialog-article-header>.btn-secondary:last-child {
    justify-self: end;
}

.font {
    color: #858585;
}

.font:hover {
    color: white;
}

article {
    padding-top: 6px;
}

.dropdown-wrapper {
    position: relative;
}

.dropdown-button {
    width: 100%;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #3a3a3a;
    background: #1a1a1a;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s;
}

.dropdown-button:hover {
    background-color: #222;
}

.dropdown-button svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s;
}

.dropdown-button.open svg {
    transform: rotate(180deg);
}

.font-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: none;
    overflow: hidden;
}

.font-dropdown.open {
    display: block;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #2a2a2a;
}

.tab {
    flex: 1;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab:hover {
    color: #fff;
    background-color: #222;
}

.tab.active {
    color: #fff;
    background-color: #222;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3b82f6;
}

.search-box {
    padding: 0.75rem;
    border-bottom: 1px solid #2a2a2a;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background-color: #222;
    border: 1px solid #333;
    border-radius: 0.375rem;
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input::placeholder {
    color: #666;
}

.font-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.font-list::-webkit-scrollbar {
    width: 8px;
}

.font-list::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.font-list::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.font-list::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.font-item {
    width: 100%;
    padding: 0.875rem 1rem;
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1rem;
}

.font-item:hover {
    background-color: #222;
}

.font-item.selected {
    background-color: rgba(59, 130, 246, 0.1);
}

.check-icon {
    width: 1rem;
    height: 1rem;
    color: #3b82f6;
    display: none;
}

.font-item.selected .check-icon {
    display: block;
}

.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #666;
}

.upload-section {
    padding: 1rem;
    border-bottom: 1px solid #2a2a2a;
}

.upload-button {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: #3b82f6;
    border: none;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.upload-button:hover {
    background-color: #2563eb;
}

.upload-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.upload-info {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #666;
}

.custom-font-item {
    position: relative;
}

.remove-font {
    padding: 0.25rem;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    border-radius: 0.25rem;
}

.custom-font-item:hover .remove-font {
    opacity: 1;
}

.remove-font:hover {
    background-color: #333;
    color: #ef4444;
}

.remove-font svg {
    width: 1rem;
    height: 1rem;
}

#file-input {
    display: none;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}