/**
 * Speed Reader - Custom Styles
 * Tailwind CSS CDNと併用
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
    background-color: #f0fdfa;
    color: #334155;
}

/* ==========================================================================
   Glass Panel Effect
   ========================================================================== */

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 32px rgba(13, 148, 136, 0.1);
}

/* ==========================================================================
   ORP (Optimal Recognition Point) Highlighting
   ========================================================================== */

.orp-char {
    color: #f43f5e;
    font-weight: 800;
}

/* ==========================================================================
   Scrollbar Hiding
   ========================================================================== */

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================================================
   Range Slider Styling
   ========================================================================== */

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 36px;
    width: 36px;
    border-radius: 50%;
    background: #0d9488;
    margin-top: -16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.1s;
    border: 2px solid white;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: #ccfbf1;
    border-radius: 3px;
}

/* Firefox */
input[type=range]::-moz-range-thumb {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background: #0d9488;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    border: 2px solid white;
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 6px;
    background: #ccfbf1;
    border-radius: 3px;
}

/* ==========================================================================
   Tab Styles
   ========================================================================== */

.tab-active {
    background-color: #0d9488;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* ==========================================================================
   Custom Shadows (referenced by Tailwind-like classes)
   ========================================================================== */

.shadow-soft {
    box-shadow: 0 4px 14px -2px rgba(13, 148, 136, 0.15);
}

.shadow-inner-soft {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.wpm-label-center {
    position: absolute;
    left: 37%;
    transform: translateX(-50%);
}

/* ==========================================================================
   Library Card Hover Effect
   ========================================================================== */

.lib-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #2dd4bf;
}

/* ==========================================================================
   Focus States for Accessibility
   ========================================================================== */

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* line-clamp utility fallback (Tailwind plugin未使用環境向け) */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Dialog Backdrop
   ========================================================================== */

dialog::backdrop {
    background-color: rgba(15, 23, 42, 0.6);
}

/* ==========================================================================
   Completion Animation
   ========================================================================== */

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
