@font-face {
    font-family: 'Parkinsans';
    src: url('Parkinsans-Regular.ttf') format('truetype');
    font-weight: 400;
}

@font-face {
    font-family: 'Parkinsans';
    src: url('Parkinsans-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('TheYearofHandicrafts-Regular.otf') format('opentype');
    font-weight: 400;
}

@font-face {
    font-family: 'TheYearofHandicrafts';
    src: url('TheYearofHandicrafts-Bold.otf') format('opentype');
    font-weight: 700;
}

:root {
    --bg: #DED7F5;
    --fg: #2D2440;
    --surface: #FFFFFF;
    --muted: #74658F;
    --accent: #7C5CFF;
    --accent-fg: #FFFFFF;
    --highlight: #F2C94C;
    --border: #E6DEF5;
    --font-main: 'Parkinsans', system-ui, sans-serif;
}

:root.dark {
    --bg: #141022;
    --fg: #DED7F5;
    --surface: #1D1830;
    --muted: #A39ABA;
    --accent: #A38BFF;
    --accent-fg: #1B1430;
    --highlight: #E9C35A;
    --border: #2F2847;
}

html[dir="rtl"] {
    --font-main: 'TheYearofHandicrafts', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg);
    color: var(--fg);
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    max-width: 480px;
}

.app-icon {
    border-radius: 28px;
    box-shadow: 0 8px 32px rgba(124, 92, 255, 0.2);
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.description {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.875rem 1.75rem;
    border-radius: 14px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(124, 92, 255, 0.35);
}

.btn-secondary {
    background: var(--surface);
    color: var(--muted);
    border: 1.5px solid var(--border);
}

.btn-disabled {
    opacity: 0.7;
    cursor: default;
}

.top-bar {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

html[dir="rtl"] .top-bar {
    right: 1.25rem;
    left: auto;
    direction: ltr;
}

.lang-toggle,
.theme-toggle {
    background: var(--surface);
    color: var(--fg);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.lang-toggle {
    font-family: 'TheYearofHandicrafts', system-ui, sans-serif;
}

html[dir="rtl"] .lang-toggle {
    font-family: 'Parkinsans', system-ui, sans-serif;
}

.theme-toggle {
    font-size: 1.1rem;
    padding: 0.4rem 0.7rem;
}

.lang-toggle:hover,
.theme-toggle:hover {
    background: var(--border);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.footer-sep {
    color: var(--muted);
    font-size: 0.85rem;
}

.privacy-link {
    font-size: 0.85rem;
    color: var(--muted);
    text-decoration: none;
}

.privacy-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .app-icon {
        width: 110px;
        height: 110px;
    }

    h1 {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }
}
