@import url('https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap');

@font-face {
    font-family: 'OGCourier';
    src: url('assets/fonts/OGCourier.woff2') format('woff2'),
    url('assets/fonts/OGCourier.woff') format('woff'),
    url('assets/fonts/OGCourier.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --main-color: #1976d2;
    --secondary-color: #F9E0AA;
    --toggle-color-light: #1976d2;
    --toggle-color-dark: #90caf9;
    --bg-color: #ffffff;
    --surface-color: #f8f9fa;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #888888;
    --border-color: #e3eaf3;
    --card-bg: #ffffff;
    --card-hover-bg: #f5faff;
    --kbd-bg: #f3f6fa;
    --kbd-border: #c5d4e8;
    --kbd-text: #1976d2;
    --topbar-bg: #ffffff;
    --footer-bg: transparent;
}

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

html, body {
    height: 100%;
}

body {
    font-family: 'OGCourier', 'Noto Sans', 'Segoe UI Symbol', 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.night-mode {
    --bg-color: #181c20;
    --surface-color: #23272e;
    --text-primary: #e0e6ed;
    --text-secondary: #b0b8c1;
    --text-muted: #888;
    --border-color: #2c313a;
    --card-bg: #23272e;
    --card-hover-bg: #23272e;
    --kbd-bg: #23272e;
    --kbd-border: #3c97ff;
    --kbd-text: #90caf9;
    --topbar-bg: #23272e;
    --footer-bg: #23272e;
    background: #181c20;
    color: #e0e6ed;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 12px rgba(30, 40, 90, 0.06);
    transition: transform 0.35s cubic-bezier(.4, 0, .2, 1), box-shadow 0.2s;
}

.topbar.nav-hidden {
    transform: translateY(-100%);
    box-shadow: none;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--main-color);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    gap: 0.6rem;
}

.site-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.site-brand:hover {
    color: var(--main-color);
    opacity: 0.85;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Theme toggle (OneTimePersona style) */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background-color: #fff;
    color: var(--text-primary);
    border: 1px solid rgba(93, 117, 152, 0.24);
    cursor: pointer;
    box-shadow: 0 0 50px 20px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

body.night-mode .theme-toggle-btn {
    background-color: #23272e;
    border-color: #cacaca;
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

.theme-icon-svg {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), color 0.6s ease;
    transform: rotate(90deg);
    color: #f59e0b; /* Yellow for sun */
}

body.night-mode .theme-icon-svg {
    transform: rotate(0deg);
    color: #a1a1aa; /* Gray for moon */
}

.sun-moon-circle {
    cx: 12px;
    cy: 12px;
    r: 5px;
    transition: r 0.4s ease, cx 0.4s ease;
}

body.night-mode .sun-moon-circle {
    r: 9px;
}

.moon-mask-circle {
    cx: 30px;
    cy: 0px;
    r: 9px;
    transition: cx 0.4s ease, cy 0.4s ease, r 0.4s ease;
}

body.night-mode .moon-mask-circle {
    cx: 15px;
    cy: 9px;
}

.sun-rays {
    transform: rotate(0deg) scale(1);
    transform-origin: center;
    opacity: 1;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

body.night-mode .sun-rays {
    transform: rotate(-90deg) scale(0);
    opacity: 0;
}

/* Layout */
.main-content {
    flex: 1 0 auto;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 0;
    width: 100%;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a2a3a;
    margin-bottom: 0.8rem;
}

body.night-mode .page-header h1 {
    color: var(--toggle-color-dark);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

.intro {
    background: var(--surface-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.7;
    border: 1px solid var(--border-color);
}

body.night-mode .intro {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* OS Tab Navigation */
.os-tabs-nav {
    margin-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
}

body.night-mode .os-tabs-nav {
    border-bottom-color: #2c313a;
}

.custom-nav-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0;
}

.custom-nav-tabs .nav-item {
    flex: 0 0 auto;
}

.os-btn {
    background: none;
    border: none;
    color: #333;
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem 0.85rem;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    min-width: auto;
    text-transform: none;
}

body.night-mode .os-btn {
    color: #b0b8c1;
}

.os-btn:hover {
    color: var(--main-color);
    background: none;
}

.os-btn.active {
    color: var(--toggle-color-light);
    font-weight: 700;
    background: none;
}

body.night-mode .os-btn.active {
    color: var(--toggle-color-dark);
}

.os-btn.active::after {
    content: '';
    display: block;
    height: 3px;
    width: 60%;
    background: var(--secondary-color);
    margin: 0 auto;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
}

.os-selector-label {
    display: none;
}

/* Content sections */
.os-content {
    display: none;
}

.os-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2a3a4a;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

body.night-mode h2 {
    color: var(--toggle-color-dark);
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--main-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

body.night-mode h3 {
    color: var(--toggle-color-dark);
}

.section-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Shortcut cards grid */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.shortcut-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s, background 0.2s;
}

/*.shortcut-card:hover {*/
/*    box-shadow: 0 4px 16px rgba(25, 118, 210, 0.12);*/
/*    transform: translateY(-2px);*/
/*    border-color: var(--main-color);*/
/*    background: var(--card-hover-bg);*/
/*}*/

body.night-mode .shortcut-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/*body.night-mode .shortcut-card:hover {*/
/*    border-color: var(--toggle-color-dark);*/
/*}*/

.keys {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

kbd {
    background: var(--kbd-bg);
    border: 1px solid var(--kbd-border);
    color: var(--kbd-text);
    padding: 0.25rem 0.55rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 1.8rem;
    text-align: center;
    box-shadow: none;
}

.plus {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.description {
    color: var(--text-primary);
    font-size: 0.98rem;
    line-height: 1.5;
}

/* Download section */
.download-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.night-mode .download-section {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.download-section h3 {
    margin-top: 0;
}

.download-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.download-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.download-btn {
    display: inline-block;
    background: var(--card-bg);
    border: 1px solid var(--main-color);
    color: var(--main-color);
    padding: 0.6rem 1.25rem;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, color 0.2s;
    min-width: 160px;
}

.download-btn:hover {
    background: var(--main-color);
    color: #fff;
    text-decoration: none;
}

body.night-mode .download-btn {
    background: #23272e;
    color: var(--toggle-color-dark);
    border-color: var(--toggle-color-dark);
}

body.night-mode .download-btn:hover {
    background: var(--toggle-color-dark);
    color: #23272e;
}

/* FAQ */
.faq-section {
    margin: 3rem 0 2rem;
    padding: 2rem 1.5rem;
    background: var(--surface-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
}

body.night-mode .faq-section {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.faq-section h2 {
    text-align: center;
    justify-content: center;
    margin-top: 0;
    font-size: 1.6rem;
}

.faq-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    margin-top: -0.5rem;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-top: none;
    background: var(--card-bg);
}

.accordion-item:first-of-type {
    border-top: 1px solid var(--border-color);
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 500;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: var(--card-hover-bg);
}

body.night-mode .accordion-header:hover {
    background: #2c313a;
}

.accordion-icon {
    font-size: 0.75rem;
    color: var(--main-color);
    transition: transform 0.2s;
}

body.night-mode .accordion-icon {
    color: var(--toggle-color-dark);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-secondary);
}

.accordion-header[aria-expanded="true"] + .accordion-content {
    padding-bottom: 1.2rem;
    padding-top: 0.25rem;
}

.accordion-content p {
    line-height: 1.6;
}

/* Links */
a {
    color: var(--main-color);
    text-decoration: underline;
    transition: color 0.2s;
}

a:hover {
    color: #0d47a1;
}

body.night-mode a,
body.night-mode a:hover {
    color: #3c97ff;
}

/* Footer */
.footer {
    flex-shrink: 0;
    text-align: center;
    padding: 1.5rem 1rem 2rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: var(--footer-bg);
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer a,
.footer a:visited {
    color: #238fee;
    text-decoration: underline dashed;
    text-underline-offset: 4px;
}

.footer a:hover,
.footer a:visited:hover {
    color: #54a7ef;
    text-decoration: underline dashed;
    text-underline-offset: 4px;
}

.footer-privacy {
    font-size: 0.8rem;
    margin-top: 0.6rem;
    color: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--secondary-color);
    color: #141414;
}

/* Mobile */
@media (max-width: 768px) {
    .topbar-inner {
        padding: 0.6rem 1rem;
    }

    .site-brand {
        font-size: 1.2rem;
    }

    .site-brand img {
        width: 32px;
        height: 32px;
    }

    .main-content {
        padding: 1.25rem 1rem 0;
    }

    .page-header h1 {
        font-size: 1.6rem;
    }

    .custom-nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }

    .os-btn {
        font-size: 1rem;
        padding: 0.65rem 1rem 0.75rem;
        white-space: nowrap;
    }

    .os-btn.active::after {
        display: none;
    }

    .shortcuts-grid {
        grid-template-columns: 1fr;
    }

    .download-buttons {
        flex-direction: column;
    }

    .download-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shortcut-card {
        padding: 1rem;
    }
}
