@font-face {
    font-family: 'FancyCatPX';
    src: url('fonts/FancyCatPX.ttf') format('truetype');
}
@font-face {
    font-family: 'SegoeUI';
    src: url('fonts/SegoeUI regular.ttf') format('truetype');
}
@font-face {
    font-family: 'Roboto';
    src: url('fonts/Roboto-Regular.ttf') format('truetype');
}
@font-face {
    font-family: 'SanFrancisco';
    src: url('fonts/SanFranciscoDisplay-Regular.ttf') format('truetype');
}

body {
    font-family: 'FancyCatPX', sans-serif;
    color: #fff;
    background: #000;
    margin: 0;
    height: 100vh;
    width: 100vw;
}

.stopwatch {
    text-align: center;
    margin-top: 60px;
}

#display {
    font-size: 7em;
    font-family: inherit;
    letter-spacing: 0.05em;
    margin: 0.4em 0 1em 0;
    user-select: none;
    background: none;
    border: none;
    text-align: center;
    width: auto;
    outline: none;
}

#display .monochar {
    display: inline-block;
    width: 1.0ch;
    text-align: center;
}

@media (max-width: 1000px) {
    #display {
        font-size: 4em;
    }
}
@media (max-width: 600px) {
    #display {
        font-size: 2.2em;
    }
}

.stopwatch button {
    font-size: 1.6em;
    margin: 0 0.5em;
    padding: 0.13em 0.6em;
    border-radius: 0.2em;
    border: none;
    background: #888;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.stopwatch button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.stopwatch button:hover:enabled {
    background: #aaf;
    color: #000;
}

#settingsBtn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 2001;
    background: none;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#settingsBtn .icon {
    width: 2.5em;
    height: 2.5em;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.modal.show {
    display: flex;
}

.modal-content {
    background: #000;
    color: #fff;
    border: 12px solid #888;
    border-radius: 40px;
    padding: 32px 48px;
    min-width: 660px;
    min-height: 360px;
    box-shadow: 0 0 32px #000c;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

@media (max-width: 1000px) {
    .modal-content.system-font { font-size: 0.95em; }
}
@media (max-width: 600px) {
    .modal-content.system-font { font-size: 0.9em; }
}

#closeSettings {
    position: absolute;
    right: 30px;
    top: 30px;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 10;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    margin-top: 10px;
}
.font-header-icon {
    width: 2.2em;
    height: 2.2em;
}
.font-header-text {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
    font-family: inherit;
}

.setting-row {
    display: flex;
    align-items: center;
    margin: 36px 0 0 0;
    width: 100%;
    justify-content: flex-start;
    gap: 32px;
}

.setting-label {
    font-size: 2.6em;
    width: 380px;
    text-align: right;
}

.setting-input {
    font-size: 2.4em;
    padding: 6px 16px;
    border: 7px solid #888;
    border-radius: 6px;
    width: 210px;
    background: #fff;
    color: #000;
    font-family: inherit;
}

/* Native browser style: Remove customizations for checkboxes and selects */
.show-hide-row input[type="checkbox"] {
    /* width: 1.15em; */
    /* height: 1.15em; */
    /* margin-right: 0.4em; */
    /* accent-color: #f7d774; */
    /* border-radius: 4px; */
    /* background: #fff; */
}

/* Remove any select/input customizations for native look */
/*
.setting-input,
select,
input[type="checkbox"] {
    appearance: none;
    background: #fff;
    border: 1px solid #888;
    border-radius: 6px;
}
*/

#importCustomFont {
    font-size: 1.8em;
    color: #00f;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 18px;
}

.icon-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon {
    width: 2em;
    height: 2em;
    display: inline-block;
    vertical-align: middle;
}

.modal-content.system-font {
    font-family: 'Segoe UI', Arial, sans-serif;
}

body[data-os="android"] .modal-content.system-font { font-family: Roboto, Arial, sans-serif; }
body[data-os="apple"] .modal-content.system-font { font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, sans-serif; }

.show-hide-row {
    font-size: 1.35em;
    margin-top: 1.5em;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
}

.show-hide-row label {
    display: inline-flex;
    align-items: center;
    margin: 0 0.7em 0 0;
    font-size: 1.2em;
    cursor: pointer;
    transition: opacity 0.2s;
}

.show-hide-row label.disabled-checkbox {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(1);
}
.show-hide-row input[type="checkbox"]:disabled {
    pointer-events: none;
}

/* .close-btn for consistent icon button styling */
.close-btn {
    position: absolute;
    right: 30px;
    top: 30px;
    font-size: 2em;
    z-index: 10;
    background: none;
    border: none;
    cursor: pointer;
}

/* Custom font notice */
#customFontNotice {
    display: none;
    font-size: 0.9em;
    color: #f7d774;
    margin-top: 4px;
}