/* CSS Reset - Apple Music Style */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

/* Remove default styles */
a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button:focus {
    outline: none;
}

input,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

input::placeholder {
    color: var(--text-tertiary);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Selection */
::selection {
    background: var(--apple-red);
    color: var(--text-primary);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--apple-red);
    outline-offset: 2px;
}

/* Prevent pull-to-refresh on mobile */
body {
    overscroll-behavior-y: contain;
}

/* Remove input autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-secondary) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Range Input Reset */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: var(--fill-tertiary);
    border-radius: var(--radius-full);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    margin-top: -4px;
    box-shadow: var(--shadow-sm);
}

input[type="range"]::-moz-range-track {
    height: 4px;
    background: var(--fill-tertiary);
    border-radius: var(--radius-full);
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-primary);
    border: none;
}