/* retoor <retoor@molodetz.nl> */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: var(--font-md);
    line-height: 1.5;
    overflow: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

button {
    font-family: var(--font-family);
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-primary);
}

input,
textarea,
select {
    font-family: var(--font-family);
    font-size: var(--font-md);
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: var(--font-xl); }
h2 { font-size: var(--font-lg); }
h3 { font-size: var(--font-md); }

code {
    font-family: var(--font-mono);
    font-size: var(--font-sm);
    background-color: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-light);
    border-radius: var(--radius-pill);
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-muted);
}

::selection {
    background-color: var(--accent-glow);
    color: var(--text-primary);
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    padding: 0 var(--gap-lg);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
}

.app-title {
    font-size: var(--font-lg);
    font-weight: 700;
    color: var(--text-primary);
}

.app-version {
    font-size: var(--font-sm);
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
}

.gallery-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: background-color var(--transition), color var(--transition);
}

.gallery-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.app-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .app-header {
        padding: 0 var(--gap-md);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .app-header {
        padding: 0 var(--gap-sm);
    }
}
