:root {
    --primary-color: #4fc3f7;
    
    --hover-color: #03a9f4;
    --bg-color: #f0f8ff;
    
    --panel-bg: #ffffff;
    --text-color: #2c3e50;
    --sub-text-color: #546e7a;
    --border-color: #e1f5fe;
    --accent-bg: #e1f5fe;
    --shadow-sm: 0 4px 12px rgba(79, 195, 247, 0.12);
    --shadow-md: 0 8px 24px rgba(79, 195, 247, 0.18);
    --radius-lg: 24px;
    --radius-md: 16px;
    --font-family: 'Zen Maru Gothic', sans-serif;
    --transition-speed: 0.3s;
    --btn-gradient: linear-gradient(135deg, var(--primary-color) 0%, #03a9f4 100%);
    --btn-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
    --btn-shadow-hover: 0 6px 16px rgba(79, 195, 247, 0.4);
}

.dark-theme {
    --primary-color: #64b5f6;
    --hover-color: #4fc3f7;
    --bg-color: #121212;
    --panel-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --sub-text-color: #b0bec5;
    --border-color: #37474f;
    --accent-bg: #263238;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.7);
    --btn-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    --btn-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.6);
}

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

button,
input,
select,
textarea {
    font-family: inherit;
}

body {
    font-family: var(--font-family);
    background: var(--bg-color);
    background: linear-gradient(135deg, var(--accent-bg) 0%, var(--bg-color) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition-speed), color var(--transition-speed);
}


.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


.language-bar .logo {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -0.5px;
    padding: 0 16px;
    white-space: nowrap;
}


.bar-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 4px;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: var(--sub-text-color);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: var(--accent-bg);
    color: var(--primary-color);
    transform: scale(1.1);
}

.icon-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.translation-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    
    width: 100%;
    margin: 0 auto;
    padding: 32px 20px 20px;
}


.language-bar {
    background-color: var(--panel-bg);
    border: none;
    border-radius: var(--radius-lg);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    gap: 12px;
}

.lang-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.lang-group {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.style-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    
}


.style-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 4px;
    animation: fadeIn 0.3s ease;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.style-bar::-webkit-scrollbar {
    display: none;
}

.style-label {
    font-size: 13px;
    color: var(--sub-text-color);
    font-weight: 500;
}

.style-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap; 
    justify-content: center; 
}

.style-btn {
    padding: 8px 20px;
    border-radius: 100px;
    
    border: 2px solid var(--border-color);
    background-color: var(--panel-bg);
    font-size: 14px;
    color: var(--sub-text-color);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.style-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: var(--accent-bg);
}

.style-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: var(--btn-shadow);
}


.custom-prompt-bar {
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

#custom-prompt-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--panel-bg);
    color: var(--text-color); 
    outline: none;
    resize: vertical;
    min-height: 40px;
    transition: border-color 0.2s;
}

#custom-prompt-input:focus {
    border-color: var(--primary-color);
}

.lang-selector {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--sub-text-color);
    transition: all 0.3s;
    user-select: none;
}

.lang-selector:hover {
    background-color: var(--accent-bg);
    color: var(--primary-color);
}

.active-lang {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.3);
}

.swap-button {
    background-color: var(--accent-bg);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.swap-button:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(180deg) scale(1.1);
}


.translation-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    min-height: 400px;
}

.panel {
    background-color: var(--panel-bg);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, background-color var(--transition-speed);
}

.panel:focus-within {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: relative;
    
}


textarea#japanese-input {
    width: 100%;
    height: 100%;
    border: none;
    resize: none;
    font-size: 24px;
    font-family: inherit;
    color: var(--text-color);
    background: transparent;
    outline: none;
    line-height: 1.4;
}

textarea#japanese-input::placeholder {
    color: #9aa0a6;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    height: 44px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

#char-count {
    font-size: 12px;
    color: #9aa0a6;
}

.translate-button {
    background: var(--btn-gradient);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--btn-shadow);
}

.translate-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow-hover);
    filter: brightness(1.05);
}

.translate-button:active {
    transform: translateY(1px);
}

.translate-button:disabled {
    background-color: #dadce0;
    color: #9aa0a6;
    cursor: default;
    box-shadow: none;
}


.output-panel {
    background-color: var(--panel-bg);
}

.output-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.02);
    pointer-events: none;
}

.dark-theme .output-panel::before {
    background-color: rgba(255, 255, 255, 0.02);
}

.result-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    height: 100%;
    
    height: auto;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa0a6;
    font-size: 22px;
}

.translated-text {
    font-size: 24px;
    line-height: 1.4;
    color: var(--text-color);
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
    
}


.ruby-section {
    margin-top: 24px;
    position: relative; 
    padding-bottom: 30px; 
}

.ruby-divider {
    height: 1px;
    background-color: var(--border-color);
    margin-bottom: 12px;
}

.ruby-label {
    font-size: 12px;
    color: var(--sub-text-color);
    margin-bottom: 4px;
}

.ruby-text {
    font-size: 18px;
    color: var(--sub-text-color);
    line-height: 2.2;
    word-break: normal;
    overflow-wrap: break-word;
    
}

.ruby-text ruby {
    ruby-align: center;
}

.ruby-text rt {
    color: var(--primary-color);
    font-size: 0.6em;
}

#copy-ruby-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
}



.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-bg);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


.error-message {
    margin-top: 10px;
    padding: 10px;
    background-color: #fce8e6;
    color: #c5221f;
    border-radius: 4px;
    font-size: 14px;
}


.translation-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 12px;
    gap: 8px;
}


.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--panel-bg);
    padding: 24px;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-md);
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    border: none;
    background: none;
    cursor: pointer;
    color: #5f6368;
}

#modal-title {
    margin-bottom: 16px;
    color: var(--text-color);
}

#modal-text {
    font-size: 16px;
    line-height: 1.6;
}


.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 500;
}

.settings-label-group {
    display: flex;
    align-items: center;
    gap: 4px;
}


footer {
    padding: 32px 40px;
    color: var(--sub-text-color);
    border-top: 1px solid var(--border-color);
    background-color: rgba(255, 255, 255, 0.5); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px); 
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
}

.footer-logo img {
    height: 32px;
    vertical-align: middle;
}

.copyright {
    font-size: 14px;
}

.credits {
    font-size: 13px;
    color: #9aa0a6;
}

.credits a {
    color: var(--sub-text-color); 
    text-decoration: underline;
}

.credits a:hover {
    color: var(--primary-color);
}


.footer-actions {
    display: flex;
    gap: 16px;
}

.footer-button {
    background: none;
    border: none;
    color: var(--sub-text-color);
    font-size: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
    padding: 4px 8px; 
    border-radius: 4px;
}

.footer-button:hover {
    color: var(--primary-color);
    background-color: var(--accent-bg);
}


#share-modal .modal-content {
    max-width: 320px !important;
}

#share-modal .modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 20px;
}


.share-modal-link-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}


.share-link-short {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--accent-bg);
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.share-link-short:hover {
    background-color: var(--border-color);
    text-decoration: none;
}

.share-link-short .link-icon {
    color: var(--primary-color);
    width: 24px;
    height: 24px;
}

#copy-share-link-btn {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--panel-bg);
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#copy-share-link-btn:hover {
    background-color: var(--accent-bg);
}


.share-modal-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    
}


.qr-zoom-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: inherit;
    color: var(--sub-text-color);
    font-size: 14px;
}

.qr-zoom-button:hover {
    opacity: 0.8;
}

.qr-code-modal {
    width: 150px;
    height: 150px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: block;
    box-shadow: var(--shadow-sm);
}


.qr-code-zoomed {
    width: 100%;
    max-width: 350px;
    height: auto;
    display: block;
    margin: 20px auto 0 auto;
    border-radius: 8px;
}

.qr-zoom-content {
    max-width: 380px !important; 
    text-align: center;
}


.contact-section {
    
}


.contact-modal-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.contact-tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--sub-text-color);
    transition: color 0.2s, border-bottom 0.2s;
    border-bottom: 3px solid transparent;
}

.contact-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.contact-form-content {
    display: none;
}

.contact-form-content.active {
    display: block;
}

.contact-form-content p {
    font-size: 14px;
    color: var(--sub-text-color);
    margin-bottom: 12px;
}

.contact-modal-body textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    font-family: monospace;
    font-size: 13px;
    background-color: var(--accent-bg);
    color: var(--text-color);
    resize: none; 
}

.form-submit-btn {
    width: 100%;
    background: var(--btn-gradient);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--btn-shadow);
    margin-top: 16px;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow-hover);
    filter: brightness(1.05);
}


.help-content section {
    margin-bottom: 24px;
}

.help-content h3 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
}

.help-content p {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text-color);
}

.help-content ul {
    list-style-type: none;
    padding-left: 0;
}

.help-content li {
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.6;
    color: var(--text-color);
}

.help-content li strong {
    color: var(--primary-color);
}

.help-content code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}


.help-key {
    background-color: var(--accent-bg);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
}


.hidden {
    display: none !important;
}


@media (max-width: 768px) {
    .app-header {
        padding: 0 16px;
        height: 56px;
    }

    .logo {
        font-size: 18px;
    }

    .translation-wrapper {
        padding: 12px;
    }

    .language-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 8px;
        gap: 8px;
    }

    .lang-group {
        font-size: 13px;
        gap: 10px;
        
        overflow-x: auto;
        
        scrollbar-width: none;
    }

    .lang-group::-webkit-scrollbar {
        display: none;
    }

    .active-lang,
    .lang-selector {
        padding: 10px 0;
    }

    .translation-container {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 8px;
    }

    .panel {
        min-height: 180px;
    }

    .panel-content {
        padding: 16px;
    }

    textarea#japanese-input,
    .translated-text {
        font-size: 18px;
    }

    .ruby-text {
        font-size: 15px;
    }

    .style-bar {
        gap: 8px;
    }

    .style-btn {
        padding: 5px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .mode-toggle-container {
        width: 100%;
        
        justify-content: center;
        margin-top: 5px;
        white-space: normal; 
    }

    footer {
        padding: 16px;
    }

    .modal-content {
        width: 90%;
        max-width: 500px;
    }
}


.about-page {
    background: #ffffff;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.about-page .app-container {
    background: transparent;
}


.about-header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 20px;
    background-image: url('hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.about-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.about-header>* {
    position: relative;
    z-index: 2;
}

.about-header h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-header p {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: #86868b;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 500;
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.back-link-top {
    position: absolute;
    top: 32px;
    left: 40px;
    z-index: 10;
    text-decoration: none;
    color: #1d1d1f;
    font-weight: 600;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.back-link-top:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}


.info-section {
    padding: 120px 20px;
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.section-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.section-hero:nth-child(even) {
    flex-direction: row-reverse;
}

.section-text {
    flex: 1;
}

.section-text h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.section-text p {
    font-size: 20px;
    line-height: 1.6;
    color: #86868b;
    margin-bottom: 32px;
}

.section-image {
    flex: 1.2;
    background: #f5f5f7;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-image:hover img {
    transform: scale(1.05);
}


.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 80px;
}

.glass-card {
    background: #f5f5f7;
    border-radius: 32px;
    padding: 50px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.glass-card h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.glass-card p {
    font-size: 17px;
    color: #86868b;
    line-height: 1.5;
}

.tech-tag {
    display: inline-block;
    padding: 8px 20px;
    background: #ffffff;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    margin-right: 12px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}


@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media (max-width: 768px) {

    .section-hero,
    .section-hero:nth-child(even) {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }

    .info-section {
        padding: 60px 20px;
    }

    .back-link-top {
        left: 20px;
        top: 20px;
        padding: 8px 16px;
        font-size: 14px;
    }
}


.mode-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.mode-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--sub-text-color);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary-color);
}

input:checked+.slider:before {
    transform: translateX(20px);
}


.settings-select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--panel-bg);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    max-width: 200px;
}

.settings-button {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background-color: var(--accent-bg);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.settings-button:hover {
    background-color: var(--border-color);
}


.custom-select-wrapper {
    position: relative;
    width: 220px;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--panel-bg);
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.custom-select-trigger:hover {
    border-color: var(--primary-color);
}

.custom-select-trigger::after {
    content: '▼';
    font-size: 10px;
    color: var(--sub-text-color);
    transform: scaleY(0.8);
    transition: transform 0.3s;
}

.custom-select-wrapper.open .custom-select-trigger::after {
    transform: rotate(180deg) scaleY(0.8);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    z-index: 10;
     
    overflow-y: visible; 
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-option:hover {
    background-color: var(--accent-bg);
}

.custom-select-option.selected {
    background-color: var(--accent-bg);
    font-weight: 500;
    color: var(--primary-color);
}


.segmented-control {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.segmented-control button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background-color: transparent;
    color: var(--sub-text-color);
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.segmented-control button:not(:last-child) {
    border-right: 1px solid var(--border-color);
}

.segmented-control button.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--btn-shadow);
}


.ruby-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.ruby-info-button {
    padding: 4px;
    width: 24px;
    height: 24px;
}

.ruby-info-button svg {
    width: 16px;
    height: 16px;
}

.tooltip {
    background-color: var(--accent-bg);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--sub-text-color);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {

    from { opacity: 0; transform: translateY(-5px); }

    to { opacity: 1; transform: translateY(0); }

}





.timeline {

    list-style: none;

    padding: 20px 0 10px;

    position: relative;

}

.timeline:before {

    content: '';

    position: absolute;

    top: 20px;

    left: 8px;

    height: calc(100% - 20px);

    width: 2px;

    background: var(--border-color);

}

.timeline-item {

    margin-bottom: 24px;

    position: relative;

    padding-left: 32px;

}

.timeline-item:before {

    content: '';

    position: absolute;

    left: 0;

    top: 4px;

    width: 18px;

    height: 18px;

    border-radius: 50%;

    background: var(--primary-color);

    border: 3px solid var(--accent-bg);

    z-index: 1;

}

.timeline-date {

    font-size: 13px;

    color: var(--sub-text-color);

    margin-bottom: 4px;

}

.timeline-version {

    font-size: 18px;

    font-weight: 700;

    color: var(--text-color);

    margin-bottom: 8px;

}

.timeline-description ul {

    padding-left: 20px;

    margin: 0;

    font-size: 14px;

    line-height: 1.6;

    color: var(--text-color);

}

.timeline-description li:not(:last-child) {

    margin-bottom: 6px;

}

.dark-theme footer {
    background-color: rgba(30, 30, 30, 0.5); 
}