/* shared.css - Base styles for heyhaigh.ai */

/* Import Geist Mono font */
@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&display=swap');

/* Material Symbols Icon Font */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

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

/* Base Typography */
body {
    font-family: 'Geist Mono', monospace;
    font-weight: 400;
    background-color: #e6e5de;
    color: #1a1a1a;
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background: linear-gradient(to bottom, #0d1327 0%, #07121f 15%);
    background-attachment: fixed;
    background-size: 100% 100vh;
    min-height: 100vh;
    color: #e6e5de;
}

/* Controls Group (theme toggle container) */
.controls-group {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1000;
}

/* Theme Toggle */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    padding: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Metrics Toggle Button */
.metrics-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    padding: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: #1a1a1a;
}

.metrics-toggle .material-symbols-outlined {
    font-size: 20px;
}

.metrics-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .metrics-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e6e5de;
}

body.dark-mode .metrics-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .theme-toggle {
        height: 54px;
        width: 54px;
        border-radius: 27px;
    }
    ry-metrics-toggle {
        display: none;
    }
}

/* Back Link */
.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    height: 38px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 19px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.dark-mode .back-link {
    color: #e6e5de;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .back-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.back-link .material-symbols-outlined {
    font-size: 20px;
    margin-right: 2px;
    margin-left: -4px;
}

@media (max-width: 768px) {
    .back-link {
        height: 54px;
        width: 54px;
        padding: 0;
        border-radius: 27px;
    }
    .back-link .back-text {
        display: none;
    }
    .back-link .material-symbols-outlined {
        margin: 0;
    }
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
}

body.dark-mode .top-nav {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.top-nav-pfp-link {
    display: block;
    border-radius: 50%;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.top-nav-pfp-link:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.dark-mode .top-nav-pfp-link:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.top-nav-pfp {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
    aspect-ratio: 1;
}

.top-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    text-decoration: none;
    color: #2F2F2F;
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    background: transparent;
    transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.top-nav-link:hover {
    background: rgba(0, 0, 0, 0.08);
}

.top-nav-link.active {
    background: rgba(0, 0, 0, 0.06);
}

body.dark-mode .top-nav-link {
    color: #e6e5de;
}

body.dark-mode .top-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .top-nav-link.active {
    background: rgba(255, 255, 255, 0.08);
}

.top-nav-link .material-symbols-outlined {
    font-size: 20px;
}

.top-nav-link .nav-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.top-nav-link span.nav-text {
    display: inline;
}

button.top-nav-link {
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 768px) {
    .top-nav {
        padding: 8px 12px;
        gap: 4px;
    }
    .top-nav-pfp-link {
        flex-shrink: 0;
    }
    .top-nav-pfp {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
    }
    .top-nav-link {
        padding: 8px;
        gap: 0;
    }
    .top-nav-link span.nav-text {
        display: none;
    }
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
}

.social-share-label {
    font-size: 12px;
    opacity: 0.5;
    margin-right: 4px;
}

.social-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-share a:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

body.dark-mode .social-share a {
    background: rgba(255, 255, 255, 0.08);
    color: #e6e5de;
}

body.dark-mode .social-share a:hover {
    background: rgba(255, 255, 255, 0.15);
}

.social-share svg {
    width: 18px;
    height: 18px;
}

/* Article Layout */
.article-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 200px 24px 80px;
}

.article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .article-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 1.3;
}

.article-subtitle {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 24px;
}

.article-meta {
    font-size: 13px;
    opacity: 0.5;
    margin-bottom: 20px;
}

.article-meta span {
    margin-right: 16px;
}

/* Article Content */
.article-content h2 {
    font-size: 20px;
    font-weight: 400;
    margin: 24px 0 10px;
    padding-top: 12px;
}

.article-content h3 {
    font-size: 18px;
    font-weight: 400;
    margin: 16px 0 8px;
}

.article-content p {
    margin-bottom: 10px;
    font-size: 14px;
}

.article-content ul, .article-content ol {
    margin: 8px 0 12px 24px;
    font-size: 14px;
}

.article-content li {
    margin-bottom: 5px;
}

.article-content strong {
    font-weight: 600;
}

/* Code Blocks */
.article-content code {
    font-family: 'Geist Mono', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 14px;
}

body.dark-mode .article-content code {
    background: rgba(255, 255, 255, 0.1);
}

.article-content pre {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    margin: 12px 0;
}

body.dark-mode .article-content pre {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-content pre code {
    background: none;
    padding: 0;
    font-size: 13px;
    line-height: 1.6;
}

/* Code Block Copy Button */
.code-block-wrapper {
    position: relative;
}

.copy-button {
    position: absolute;
    bottom: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 11px;
    font-family: 'Geist Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.7);
}

.copy-button.copied {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: rgb(34, 197, 94);
}

body.dark-mode .copy-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .copy-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .copy-button.copied {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.3);
    color: rgb(34, 197, 94);
}

.copy-button svg {
    width: 12px;
    height: 12px;
}

/* Related Article Callout */
.article-callout {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
    text-align: center;
}

body.dark-mode .article-callout {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.article-callout-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 8px;
}

.article-callout a {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    color: inherit;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.article-callout a:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .article-callout a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Metrics Modal */
.metrics-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metrics-modal.active {
    display: flex;
    opacity: 1;
}

.metrics-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.metrics-content {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body.dark-mode .metrics-content {
    background: rgba(7, 18, 31, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.metrics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.metrics-title {
    font-family: 'Geist Mono', monospace;
    font-size: 24px;
    font-weight: 400;
    color: #1a1a1a;
    margin: 0;
}

body.dark-mode .metrics-title {
    color: #e6e5de;
}

.metrics-close {
    width: 24px;
    height: 24px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #333;
    padding: 0;
}

.metrics-close:hover {
    opacity: 0.75;
}

body.dark-mode .metrics-close {
    color: #e6e5de;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.metric-card {
    padding: 20px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 8px;
}

body.dark-mode .metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 28px;
    font-weight: 400;
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .metrics-content {
        padding: 24px;
    }
}

/* =========================================
   Tables
   ========================================= */

.ry-table-wrapper {
    display: block;
    margin: 16px 0;
    overflow-x: auto;
}

.ry-table-wrapper table,
.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin: 16px 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .ry-table-wrapper table,
body.dark-mode .article-content table {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ry-table-wrapper th,
.ry-table-wrapper td,
.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.dark-mode .ry-table-wrapper th,
body.dark-mode .ry-table-wrapper td,
body.dark-mode .article-content th,
body.dark-mode .article-content td {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ry-table-wrapper th,
.article-content th {
    font-weight: 600;
    background: rgba(0, 0, 0, 0.02);
}

body.dark-mode .ry-table-wrapper th,
body.dark-mode .article-content th {
    background: rgba(255, 255, 255, 0.02);
}

.ry-table-wrapper code,
.article-content table code {
    font-family: 'Geist Mono', monospace;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

body.dark-mode .ry-table-wrapper code,
body.dark-mode .article-content table code {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .ry-table-wrapper table,
    .article-content table {
        font-size: 12px;
    }
    .ry-table-wrapper th,
    .ry-table-wrapper td,
    .article-content th,
    .article-content td {
        padding: 8px 12px;
    }
}

/* =========================================
   Diagrams
   ========================================= */

.diagram-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.diagram-container {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 20px;
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre;
}

body.dark-mode .diagram-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.diagram-container pre {
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

ry-diagram {
    display: block;
    margin: 20px 0;
}

/* =========================================
   Author Bio
   ========================================= */

.author-bio {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 24px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    margin: 24px 0;
}

body.dark-mode .author-bio {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.author-bio-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-bio-content {
    flex: 1;
}

.author-bio-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.author-bio-title {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 10px;
}

.author-bio-text {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.8;
}

.author-bio-links {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.author-bio-links a {
    font-size: 13px;
    color: inherit;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.author-bio-links a:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .author-bio-links {
        justify-content: center;
    }
}

/* =========================================
   FAQ
   ========================================= */

.article-faq,
ry-faq {
    display: block;
    margin: 32px 0;
    padding: 24px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-mode .article-faq,
body.dark-mode ry-faq {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.article-faq h2,
ry-faq h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
}

.faq-item,
ry-faq-item {
    display: block;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .faq-item,
body.dark-mode ry-faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item:last-child,
ry-faq-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 8px;
}

.faq-answer {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.6;
}

/* =========================================
   Callouts
   ========================================= */

.ry-callout,
ry-callout {
    display: block;
    background: rgba(0, 0, 0, 0.04);
    border-left: 3px solid rgba(0, 0, 0, 0.3);
    padding: 16px 20px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

body.dark-mode .ry-callout,
body.dark-mode ry-callout {
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(255, 255, 255, 0.3);
}

/* Quote style (default) - dark gray border */
.ry-callout-quote,
ry-callout[type="quote"] {
    border-left-color: rgba(0, 0, 0, 0.4);
    font-style: italic;
}

body.dark-mode .ry-callout-quote,
body.dark-mode ry-callout[type="quote"] {
    border-left-color: rgba(255, 255, 255, 0.4);
}

/* Tip style - green border */
.ry-callout-tip,
ry-callout[type="tip"] {
    border-left-color: #22c55e;
}

/* Warning style - orange border */
.ry-callout-warning,
ry-callout[type="warning"] {
    border-left-color: #f59e0b;
}

.ry-callout p:last-child,
ry-callout p:last-child {
    margin-bottom: 0;
}

.ry-callout strong,
ry-callout strong {
    font-weight: 600;
}

/* ========================================
   Related Articles Component
   ======================================== */
.ry-related-articles,
ry-related-articles {
    display: block;
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .ry-related-articles,
body.dark-mode ry-related-articles {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.ry-related-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

ry-related-card {
    display: block;
    margin-bottom: 16px;
}

ry-related-card:last-child {
    margin-bottom: 0;
}

.ry-related-card-link {
    display: block;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.ry-related-card-link:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.dark-mode .ry-related-card-link {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .ry-related-card-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ry-related-card-meta {
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.ry-related-card-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.3;
}

.ry-related-card-excerpt {
    font-size: 14px;
    opacity: 0.7;
    line-height: 1.6;
    margin-bottom: 12px;
}

.ry-related-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Article Tags (pill style) */
.article-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    opacity: 0.7;
}

body.dark-mode .article-tag {
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .ry-related-card-link {
        padding: 20px;
    }

    .ry-related-card-title {
        font-size: 18px;
    }
}

/* ========================================
   Paywall Component
   ======================================== */
ry-paywall {
    display: block;
}

.ry-paywall-container {
    position: relative;
}

.ry-paywall-preview {
    position: relative;
}

.ry-paywall-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, #e6e5de);
    pointer-events: none;
}

body.dark-mode .ry-paywall-preview::after {
    background: linear-gradient(transparent, #07121f);
}

.ry-paywall-overlay {
    padding-top: 30px;
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

.ry-paywall-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px 24px;
}

body.dark-mode .ry-paywall-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ry-paywall-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.ry-paywall-description {
    font-size: 14px;
    opacity: 0.8;
    margin: 0 0 8px 0;
}

.ry-paywall-price {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.ry-paywall-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    background: #1a1a1a;
    border-radius: 999px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.ry-paywall-btn:hover {
    background: #333;
}

body.dark-mode .ry-paywall-btn {
    color: #1a1a1a;
    background: #e6e5de;
}

body.dark-mode .ry-paywall-btn:hover {
    background: #fff;
}

.ry-paywall-note {
    font-size: 12px;
    opacity: 0.5;
    margin: 4px 0 0 0;
}

/* ========================================
   Unlock Card Component (standalone)
   ======================================== */
ry-unlock-card {
    display: block;
}

.ry-unlock-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px 24px;
}

body.dark-mode .ry-unlock-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ry-unlock-card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.ry-unlock-card-description {
    font-size: 14px;
    opacity: 0.8;
    margin: 0 0 8px 0;
}

.ry-unlock-card-price {
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.ry-unlock-card-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    background: #1a1a1a;
    border-radius: 999px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.ry-unlock-card-btn:hover {
    background: #333;
}

body.dark-mode .ry-unlock-card-btn {
    color: #1a1a1a;
    background: #e6e5de;
}

body.dark-mode .ry-unlock-card-btn:hover {
    background: #fff;
}

.ry-unlock-card-note {
    font-size: 12px;
    opacity: 0.5;
    margin: 4px 0 0 0;
}

/* ========================================
   RY-PAGE-HEADER COMPONENT
   ======================================== */

.ry-page-header {
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .ry-page-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ry-page-header-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 12px;
}

.ry-page-header-subtitle {
    font-size: 14px;
    opacity: 0.7;
}

/* ========================================
   RY-PROFILE-HEADER COMPONENT
   ======================================== */

.ry-profile-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.ry-profile-header-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ry-profile-header-info {
    flex: 1;
}

.ry-profile-header-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ry-profile-header-credit {
    font-size: 13px;
    opacity: 0.6;
    margin-bottom: 12px;
}

.ry-profile-header-credit a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ry-profile-header-credit a:hover {
    opacity: 0.7;
}

.ry-profile-header-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ry-profile-header-social-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #1a1a1a;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.ry-profile-header-social-btn:hover {
    background: rgba(0, 0, 0, 0.12);
}

body.dark-mode .ry-profile-header-social-btn {
    color: #e6e5de;
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .ry-profile-header-social-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 768px) {
    .ry-profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ry-profile-header-social-links {
        justify-content: flex-start;
    }
}

/* ========================================
   RY-HOW-TO COMPONENT
   ======================================== */

ry-how-to,
.ry-how-to {
    display: block;
    margin-bottom: 48px;
}

.ry-how-to-header {
    margin-bottom: 24px;
}

.ry-how-to-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 8px;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .ry-how-to-title {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ry-how-to-date {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

body.dark-mode .ry-how-to-date {
    color: #888;
}

ry-how-to-step,
.ry-how-to-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.dark-mode ry-how-to-step,
body.dark-mode .ry-how-to-step {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

ry-how-to-step:last-of-type,
.ry-how-to-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ry-how-to-step-number {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

body.dark-mode .ry-how-to-step-number {
    background: rgba(255, 255, 255, 0.1);
}

.ry-how-to-step-content {
    flex: 1;
}

.ry-how-to-step-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ry-how-to-step-description {
    font-size: 14px;
    opacity: 0.75;
    margin: 0;
}

/* ========================================
   RY-FEATURE-CARD COMPONENT
   ======================================== */

ry-feature-card {
    display: block;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 24px;
}

body.dark-mode ry-feature-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ry-feature-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ry-feature-card-description {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 16px;
}

.ry-feature-card-features {
    list-style: none;
    margin-bottom: 20px;
    padding: 0;
}

.ry-feature-card-features li {
    font-size: 13px;
    padding: 6px 0;
    opacity: 0.75;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ry-feature-card-features li::before {
    content: ">";
    opacity: 0.5;
}

.ry-feature-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    background: #1a1a1a;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.ry-feature-card-cta:hover {
    background: #333;
}

body.dark-mode .ry-feature-card-cta {
    color: #1a1a1a;
    background: #e6e5de;
}

body.dark-mode .ry-feature-card-cta:hover {
    background: #fff;
}

/* ========================================
   RY-BENTO-GRID COMPONENT
   ======================================== */

ry-bento-grid,
.ry-bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    ry-bento-grid,
    .ry-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   RY-BENTO-CARD COMPONENT
   ======================================== */

ry-bento-card,
ry-contribution-chart,
ry-progress-card,
ry-supplement-card {
    display: flex;
    flex-direction: column;
    background: #f6f8fa;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #e5e5e5;
    font-family: 'Geist Mono', monospace;
    min-height: 165px;
}

body.dark-mode ry-bento-card,
body.dark-mode ry-contribution-chart,
body.dark-mode ry-progress-card,
body.dark-mode ry-supplement-card {
    background: #161b22;
    border-color: #30363d;
}

.ry-bento-card-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #4d5561;
    margin-bottom: 6px;
    font-family: 'Geist Mono', monospace;
}

body.dark-mode .ry-bento-card-label {
    color: #8b949e;
}

/* Heartbeat pulse animation for HR value */
@keyframes ry-heartbeat {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.ry-hr-pulse {
    animation: ry-heartbeat var(--heartbeat-duration, 1.3s) ease-in-out infinite;
}

.ry-bento-card-value {
    font-size: 24px;
    font-weight: 600;
    color: #1f2328;
    line-height: 1.1;
    font-family: 'Geist Mono', monospace;
}

body.dark-mode .ry-bento-card-value {
    color: #e6edf3;
}

.ry-bento-card-unit {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-left: 2px;
}

body.dark-mode .ry-bento-card-unit {
    color: #6e7681;
}

.ry-bento-card-subtitle {
    font-size: 11px;
    color: #999;
    margin-top: auto;
    padding-top: 4px;
    font-family: 'Geist Mono', monospace;
}

body.dark-mode .ry-bento-card-subtitle {
    color: #6e7681;
}

/* ========================================
   RY-CONTRIBUTION-CHART COMPONENT
   ======================================== */

.ry-contribution-chart {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ry-contribution-grid {
    display: grid;
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
    gap: 3px;
    justify-content: center;
}

/* .ry-contribution-day styles moved to CONTRIBUTION CHART TOOLTIPS section */

.ry-contribution-day.level-1 { background-color: #d0d0d0; }
.ry-contribution-day.level-2 { background-color: #a0a0a0; }
.ry-contribution-day.level-3 { background-color: #707070; }
.ry-contribution-day.level-4 { background-color: #404040; }

body.dark-mode .ry-contribution-day.level-1 { background-color: #404040; }
body.dark-mode .ry-contribution-day.level-2 { background-color: #707070; }
body.dark-mode .ry-contribution-day.level-3 { background-color: #a0a0a0; }
body.dark-mode .ry-contribution-day.level-4 { background-color: #d0d0d0; }

.ry-contribution-total {
    font-size: 11px;
    color: #999;
    margin-top: auto;
    padding-top: 8px;
    text-align: center;
    font-family: 'Geist Mono', monospace;
}

body.dark-mode .ry-contribution-total {
    color: #6e7681;
}

/* ========================================
   RY-PROGRESS-CARD COMPONENT
   ======================================== */

.ry-progress-container {
    width: 100%;
    height: 6px;
    background: #e1e4e8;
    border-radius: 3px;
    margin-top: 8px;
    position: relative;
    overflow: visible;
}

body.dark-mode .ry-progress-container {
    background: #30363d;
}

.ry-progress-container:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    background: #24292f;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    z-index: 100;
    font-family: 'Geist Mono', monospace;
    pointer-events: none;
}

body.dark-mode .ry-progress-container:hover::after {
    background: #f0f6fc;
    color: #24292f;
}

.ry-progress-bar {
    height: 100%;
    background: #6e7681;
    border-radius: 3px;
    transition: width 0.6s ease-out;
    min-width: 0;
}

body.dark-mode .ry-progress-bar {
    background: #8b949e;
}

.ry-progress-bar.complete {
    background: #1f2328;
}

body.dark-mode .ry-progress-bar.complete {
    background: #e6edf3;
}

/* ========================================
   RY-SUPPLEMENT-CARD COMPONENT
   ======================================== */

ry-supplement-card {
    min-height: 165px;
    max-height: 165px;
    height: 165px;
}

.ry-supplement-scroll {
    overflow-y: auto;
    flex: 1;
    max-height: 120px;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.ry-supplement-scroll::-webkit-scrollbar {
    width: 4px;
}

.ry-supplement-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ry-supplement-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

body.dark-mode .ry-supplement-scroll::-webkit-scrollbar-thumb {
    background: #444;
}

.ry-supplement-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

ry-supplement-section,
.ry-supplement-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ry-supplement-time {
    font-size: 24px;
    font-weight: 600;
    color: #1f2328;
    line-height: 1.2;
    font-family: 'Geist Mono', monospace;
    margin-bottom: 2px;
}

body.dark-mode .ry-supplement-time {
    color: #e6edf3;
}

ry-supplement-item,
.ry-supplement-item {
    display: block;
    font-size: 11px;
    color: #656d76;
    line-height: 1.3;
    padding-left: 8px;
    position: relative;
}

ry-supplement-item::before,
.ry-supplement-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ccc;
}

body.dark-mode ry-supplement-item,
body.dark-mode .ry-supplement-item {
    color: #8b949e;
}

body.dark-mode ry-supplement-item::before,
body.dark-mode .ry-supplement-item::before {
    background: #484f58;
}

.ry-supplement-note {
    font-size: 9px;
    color: #999;
    padding-left: 12px;
    margin-top: -1px;
}

body.dark-mode .ry-supplement-note {
    color: #6e7681;
}

/* ========================================
   RY-HEART-RATE-CARD COMPONENT
   ======================================== */

ry-heart-rate-card {
    display: flex;
    flex-direction: column;
    background: #f6f8fa;
    border-radius: 10px;
    padding: 12px;
    border: 1px solid #e5e5e5;
    font-family: 'Geist Mono', monospace;
    min-height: 165px;
}

body.dark-mode ry-heart-rate-card {
    background: #161b22;
    border-color: #30363d;
}

.ry-hr-value {
    font-size: 24px;
    font-weight: 600;
    color: #1f2328;
    line-height: 1.1;
    font-family: 'Geist Mono', monospace;
    display: flex;
    align-items: baseline;
}

body.dark-mode .ry-hr-value {
    color: #e6edf3;
}

.ry-hr-value-hr,
.ry-hr-value-hrv {
    font-weight: 600;
}

.ry-hr-value-unit {
    font-size: 12px;
    font-weight: 400;
    color: #999;
}

body.dark-mode .ry-hr-value-unit {
    color: #6e7681;
}

.ry-hr-value-separator {
    font-size: 24px;
    font-weight: 400;
    color: #1f2328;
    margin: 0 1px;
}

body.dark-mode .ry-hr-value-separator {
    color: #e6edf3;
}

.ry-hr-chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 8px;
    min-height: 50px;
}

.ry-hr-chart {
    width: 100%;
    height: 50px;
}

.ry-hr-chart-line-hr {
    stroke: #1f2328;
}

body.dark-mode .ry-hr-chart-line-hr {
    stroke: #e6edf3;
}

.ry-hr-chart-line-hrv {
    stroke: #a0a0a0;
}

body.dark-mode .ry-hr-chart-line-hrv {
    stroke: #6e7681;
}

.ry-hr-chart-dot-hr {
    fill: #1f2328;
}

body.dark-mode .ry-hr-chart-dot-hr {
    fill: #e6edf3;
}

.ry-hr-chart-dot-hrv {
    fill: #a0a0a0;
}

body.dark-mode .ry-hr-chart-dot-hrv {
    fill: #6e7681;
}

.ry-hr-chart-dot-hitarea {
    cursor: pointer;
}

.ry-hr-chart-dot-hitarea:hover + .ry-hr-chart-dot-hr,
.ry-hr-chart-dot-hitarea:hover ~ .ry-hr-chart-dot-hrv {
    r: 4;
}

/* Chart tooltip positioning */
.ry-hr-chart-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

/* Gradient fills under chart lines */
.ry-hr-gradient-stop-hr-top {
    stop-color: rgba(31, 35, 40, 0.2);
}
.ry-hr-gradient-stop-hr-bottom {
    stop-color: rgba(31, 35, 40, 0.02);
}
body.dark-mode .ry-hr-gradient-stop-hr-top {
    stop-color: rgba(230, 237, 243, 0.2);
}
body.dark-mode .ry-hr-gradient-stop-hr-bottom {
    stop-color: rgba(230, 237, 243, 0.02);
}

.ry-hr-gradient-stop-hrv-top {
    stop-color: rgba(160, 160, 160, 0.15);
}
.ry-hr-gradient-stop-hrv-bottom {
    stop-color: rgba(160, 160, 160, 0.02);
}
body.dark-mode .ry-hr-gradient-stop-hrv-top {
    stop-color: rgba(110, 118, 129, 0.15);
}
body.dark-mode .ry-hr-gradient-stop-hrv-bottom {
    stop-color: rgba(110, 118, 129, 0.02);
}

/* ========================================
   CONTRIBUTION CHART TOOLTIPS
   ======================================== */

.ry-contribution-day {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background-color: #ebedf0;
    position: relative;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.ry-contribution-day:hover {
    transform: scale(1.2);
    z-index: 10;
}

.ry-contribution-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #24292f;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    font-family: 'Geist Mono', monospace;
}

body.dark-mode .ry-contribution-tooltip {
    background: #f0f6fc;
    color: #24292f;
}

.ry-contribution-day:hover .ry-contribution-tooltip {
    opacity: 1;
}

body.dark-mode .ry-contribution-day {
    background-color: #2d333b;
}

/* ========================================
   TOOLTIP COMPONENT
   ======================================== */

ry-tooltip {
    display: inline-block;
}

.ry-tooltip {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-family: 'Geist Mono', monospace;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.ry-tooltip-visible {
    opacity: 1;
}

/* Simple tooltip (dark background, white text) */
.ry-tooltip-simple {
    background: #24292f;
    color: #fff;
    padding: 6px 10px;
    font-size: 11px;
    white-space: nowrap;
}

body.dark-mode .ry-tooltip-simple {
    background: #f0f6fc;
    color: #24292f;
}

/* Chart tooltip (white background, structured data) */
.ry-tooltip-chart {
    background: #fff;
    color: #1f2328;
    padding: 10px 12px;
    min-width: 140px;
}

body.dark-mode .ry-tooltip-chart {
    background: #2d333b;
    color: #e6edf3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ry-tooltip-time {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1f2328;
}

body.dark-mode .ry-tooltip-time {
    color: #e6edf3;
}

.ry-tooltip-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 2px;
}

.ry-tooltip-row:last-child {
    margin-bottom: 0;
}

.ry-tooltip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ry-tooltip-dot-hr {
    background: #1f2328;
}

body.dark-mode .ry-tooltip-dot-hr {
    background: #e6edf3;
}

.ry-tooltip-dot-hrv {
    background: #a0a0a0;
}

body.dark-mode .ry-tooltip-dot-hrv {
    background: #6e7681;
}

.ry-tooltip-label {
    color: #656d76;
}

body.dark-mode .ry-tooltip-label {
    color: #8b949e;
}

.ry-tooltip-value {
    font-weight: 500;
    color: #1f2328;
}

body.dark-mode .ry-tooltip-value {
    color: #e6edf3;
}

/* ===== RY-PREMIUM-CARD ===== */
ry-premium-card {
    display: block;
}

.ry-premium-card {
    --mouse-x: 50%;
    --mouse-y: 50%;
    display: block;
    padding: 32px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(230, 126, 34, 0.3);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    font-family: 'Geist Mono', monospace;
}

.ry-premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(230, 126, 34, 0.15),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

.ry-premium-card:hover::before {
    opacity: 1;
}

.ry-premium-card:hover {
    border-color: rgba(230, 126, 34, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(230, 126, 34, 0.15);
}

.ry-premium-card > * {
    position: relative;
    z-index: 1;
}

body.dark-mode .ry-premium-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(230, 126, 34, 0.35);
}

body.dark-mode .ry-premium-card::before {
    background: radial-gradient(
        600px circle at var(--mouse-x) var(--mouse-y),
        rgba(230, 126, 34, 0.25),
        transparent 40%
    );
}

body.dark-mode .ry-premium-card:hover {
    border-color: rgba(230, 126, 34, 0.6);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.ry-premium-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    margin-bottom: 12px;
}

.ry-premium-card-badge svg {
    flex-shrink: 0;
}

.ry-premium-card-meta {
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 10px;
}

.ry-premium-card-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 12px;
    line-height: 1.3;
}

.ry-premium-card-description {
    font-size: 15px;
    opacity: 0.75;
    line-height: 1.6;
    margin-bottom: 16px;
}

.ry-premium-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.ry-premium-card-tag {
    font-size: 11px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    opacity: 0.7;
}

body.dark-mode .ry-premium-card-tag {
    background: rgba(255, 255, 255, 0.08);
}

.ry-premium-card-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(230, 126, 34, 0.1);
    border: 1px solid rgba(230, 126, 34, 0.3);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #e67e22;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.ry-premium-card-price:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
    transform: scale(1.02);
}

body.dark-mode .ry-premium-card-price {
    background: rgba(230, 126, 34, 0.15);
    border-color: rgba(230, 126, 34, 0.4);
    color: #f39c12;
}

body.dark-mode .ry-premium-card-price:hover {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.ry-premium-card-price svg {
    flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ry-premium-card {
        padding: 24px;
    }

    .ry-premium-card-title {
        font-size: 20px;
    }
}

/* ========================================
   RY-CLIENT-CAROUSEL COMPONENT
   ======================================== */

ry-client-carousel {
    display: block;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    margin-bottom: 48px;
}

.ry-clients-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.ry-clients-row {
    display: flex;
    width: max-content;
}

.ry-clients-row-1 {
    animation: ry-scroll-left 40s linear infinite;
}

.ry-clients-row-2 {
    animation: ry-scroll-right 40s linear infinite;
    margin-top: 16px;
}

.ry-clients-row-3 {
    animation: ry-scroll-left 40s linear infinite;
    margin-top: 16px;
}

.ry-clients-row:hover {
    animation-play-state: paused;
}

@keyframes ry-scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes ry-scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.ry-client-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 180px;
    height: 78px;
    position: relative;
    transition: transform 0.3s ease;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    margin: 0 6px;
}

body.dark-mode .ry-client-item {
    border-color: rgba(255, 255, 255, 0.15);
}

.ry-client-item:hover {
    transform: scale(1.08);
    border-color: rgba(0, 0, 0, 0.25);
}

body.dark-mode .ry-client-item:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.ry-client-logo-img {
    max-height: 70px;
    max-width: 160px;
    width: auto;
    height: auto;
    filter: brightness(0);
    transition: filter 0.3s ease;
    object-fit: contain;
}

body.dark-mode .ry-client-logo-img {
    filter: brightness(0) invert(1);
}

.ry-clients-label {
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.5;
    margin-top: 0;
    font-family: 'Geist Mono', monospace;
}

/* ========================================
   RY-CLIENT-LOGO COMPONENT
   ======================================== */

ry-client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 78px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

body.dark-mode ry-client-logo {
    border-color: rgba(255, 255, 255, 0.15);
}

ry-client-logo:hover {
    transform: scale(1.08);
    border-color: rgba(0, 0, 0, 0.25);
}

body.dark-mode ry-client-logo:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

ry-client-logo .ry-client-logo-img {
    max-height: 70px;
    max-width: 160px;
    width: auto;
    height: auto;
    filter: brightness(0);
    transition: filter 0.3s ease;
    object-fit: contain;
}

body.dark-mode ry-client-logo .ry-client-logo-img {
    filter: brightness(0) invert(1);
}

/* ========================================
   RY-VOICE-BUTTON COMPONENT
   ======================================== */

ry-voice-button {
    display: inline-block;
}

.ry-voice-button {
    background: #000000;
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    height: 46px;
    color: white;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ry-voice-button:hover {
    background: #2A2A2A;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ry-voice-button:active {
    transform: scale(0.98);
}

.ry-voice-button.inactive {
    opacity: 0.4;
    cursor: not-allowed;
}

.ry-voice-button.inactive:hover {
    background: #000000;
    transform: none;
}

body.dark-mode .ry-voice-button {
    background: #ffffff;
    color: #000000;
}

body.dark-mode .ry-voice-button:hover {
    background: #f0f0f0;
}

body.dark-mode .ry-voice-button.inactive:hover {
    background: #ffffff;
}

.ry-voice-button-icon {
    width: 16px;
    height: 16px;
}

body.dark-mode .ry-voice-button-icon {
    color: #000000;
}

.ry-voice-button-dots::after {
    content: '';
    animation: ryLoadingDots 1.5s infinite;
}

@keyframes ryLoadingDots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* ========================================
   RY-EQUALIZER COMPONENT
   ======================================== */

ry-equalizer {
    display: inline-flex;
}

.ry-equalizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 40px;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.ry-eq-bar {
    width: 3px;
    background: #a0a0a0;
    border-radius: 2px;
    height: 10px;
    /* No transition - JS animation handles smooth updates via requestAnimationFrame */
}

body.dark-mode .ry-eq-bar {
    background: #606060;
}

@media (max-width: 768px) {
    .ry-equalizer {
        min-width: 60px;
        max-width: 100px;
    }

    .ry-eq-bar {
        display: none;
    }
    .ry-eq-bar:nth-child(4n) {
        display: block;
    }
}

/* ========================================
   RY-CAPTIONS COMPONENT
   ======================================== */

ry-captions {
    display: block;
}

.ry-captions-container {
    width: 100%;
    max-width: 500px;
    max-height: 200px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

body.dark-mode .ry-captions-container {
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ry-captions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.03);
}

body.dark-mode .ry-captions-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.ry-captions-title {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
}

body.dark-mode .ry-captions-title {
    color: #999;
}

.ry-captions-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.ry-captions-close:hover {
    color: #333;
}

body.dark-mode .ry-captions-close:hover {
    color: #fff;
}

.ry-captions-content {
    padding: 12px 14px;
    max-height: 150px;
    overflow-y: auto;
    scroll-behavior: smooth;
}

.ry-captions-placeholder {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: #999;
    text-align: center;
    font-style: italic;
}

.ry-caption-entry {
    margin-bottom: 10px;
    animation: ryCaptionFadeIn 0.3s ease;
}

.ry-caption-entry:last-child {
    margin-bottom: 0;
}

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

.ry-caption-speaker {
    font-family: 'Geist Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

.ry-caption-speaker.user {
    color: #2563eb;
}

.ry-caption-speaker.assistant {
    color: #059669;
}

body.dark-mode .ry-caption-speaker.user {
    color: #60a5fa;
}

body.dark-mode .ry-caption-speaker.assistant {
    color: #34d399;
}

.ry-caption-text {
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #1a1a1a;
}

body.dark-mode .ry-caption-text {
    color: #e6e5de;
}

/* ========================================
   RY-VOICE-CONTROLS COMPONENT
   ======================================== */

ry-voice-controls {
    display: inline-block;
}

.ry-voice-controls {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 50px;
    padding: 16px 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    font-family: 'Geist Mono', monospace;
}

body.dark-mode .ry-voice-controls {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

.ry-call-timer {
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    color: #1a1a1a;
    min-width: 75px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

body.dark-mode .ry-call-timer {
    color: #e0e0e0;
}

.ry-button-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ry-control-btn {
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ry-control-btn:hover {
    background: #e8e8e8;
}

body.dark-mode .ry-control-btn {
    background: #2a2a2a;
}

body.dark-mode .ry-control-btn:hover {
    background: #3a3a3a;
}

/* Active state for captions button (blue) */
.ry-control-btn-captions.active {
    background: #2563eb;
}

.ry-control-btn-captions.active .ry-control-icon {
    color: #fff;
    fill: #fff;
}

.ry-control-btn-captions.active:hover {
    background: #1d4ed8;
}

body.dark-mode .ry-control-btn-captions.active {
    background: #3b82f6;
}

body.dark-mode .ry-control-btn-captions.active:hover {
    background: #2563eb;
}

/* Active state for mute button */
.ry-control-btn-mute.active {
    background: #e8e8e8;
}

body.dark-mode .ry-control-btn-mute.active {
    background: #3a3a3a;
}

.ry-control-icon {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: #1a1a1a;
    fill: #1a1a1a;
    display: block;
}

body.dark-mode .ry-control-icon {
    color: #e0e0e0;
    fill: #e0e0e0;
}

.ry-voice-end-call {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2a2a2a;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ry-voice-end-call:hover {
    background: #3a3a3a;
}

body.dark-mode .ry-voice-end-call {
    background: #ffffff;
    color: #000000;
}

body.dark-mode .ry-voice-end-call:hover {
    background: #e5e5e5;
}

.ry-voice-end-call svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .ry-voice-controls {
        gap: 14px;
        padding: 12px 18px;
    }

    .ry-call-timer {
        font-size: 11px;
        min-width: 65px;
    }

    .ry-control-btn {
        width: 40px;
        height: 40px;
    }

    .ry-voice-end-call {
        padding: 12px 18px;
    }

    .ry-voice-end-call span {
        display: none;
    }
}

/* ===== Animation Player Component ===== */
.ry-animation-player {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ry-anim-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    z-index: 1;
}

.ry-anim-video.playing {
    opacity: 1;
}

/* Stacking order for video layers */
.ry-anim-video-idle {
    z-index: 1;
}

.ry-anim-video-answer,
.ry-anim-video-talking,
.ry-anim-video-end {
    z-index: 3;
}
