/* Global Styles */
:root {
    --text-color: #1d1d1f;
    --background-color: #ffffff;
    --secondary-text: #86868b;
    --link-color: #0066cc;
    --accent-color: #0071e3;
    --footer-bg: #f5f5f7;
    --border-color: #d2d2d7;
    --gap-size: 40px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

/* Navigation */
.global-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    position: relative;
    /* Changed from sticky */
    /* top: 0; Removed */
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-content {
    max-width: 980px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-links a {
    font-size: 14px;
    color: var(--secondary-text);
}

.nav-links a:hover {
    color: var(--text-color);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 120px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1d1d1f 0%, #434344 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--secondary-text);
    font-weight: 400;
}

/* Apps Section */
.apps-section {
    padding: 80px 20px;
    background-color: #fbfbfd;
}

.container {
    max-width: 980px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 10px;
}

.section-header p {
    font-size: 20px;
    color: var(--secondary-text);
}

.app-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.app-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.app-card:hover {
    transform: translateY(-5px);
}

.app-icon {
    width: 120px;
    height: 120px;
    border-radius: 26px;
    /* iOS Icon shape approximation */
    margin-right: 40px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.app-info {
    flex: 1;
}

.app-info h3 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 4px;
}

.app-category {
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.app-description {
    font-size: 18px;
    color: var(--secondary-text);
    line-height: 1.5;
    margin-bottom: 20px;
}

.app-store-btn {
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.app-store-btn:hover {
    background-color: #333;
    opacity: 1;
}

/* About Section */
.about-section {
    padding: 100px 20px;
    text-align: center;
}

.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 32px;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-color);
}

/* Footer */
.global-footer {
    background-color: var(--footer-bg);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer-content h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.footer-content p {
    color: var(--secondary-text);
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 24px;
}

.legal-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.legal-links a {
    font-size: 13px;
    color: var(--secondary-text);
}

.legal-links a:hover {
    color: var(--accent-color);
}

.social-links a {
    color: var(--accent-color);
    font-weight: 500;
}

.social-links a:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 12px;
    color: #a1a1a6;
}

/* Scroll to Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#scrollToTopBtn.visible {
    opacity: 1;
    visibility: visible;
}

#scrollToTopBtn:hover {
    background-color: #0077ed;
    transform: translateY(-2px);
}

/* ========================================
   Legal Pages
   ======================================== */
.legal-section {
    padding: 80px 20px 120px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-page-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.legal-page-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.legal-page-header .legal-page-title {
    margin-bottom: 0;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: var(--secondary-text);
    font-size: 14px;
    font-weight: 600;
}

.language-switcher select {
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

/* Tab Navigation */
.legal-nav-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 60px;
    border-bottom: 2px solid var(--border-color);
}

.legal-nav-tabs a {
    padding: 15px 30px;
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-text);
    position: relative;
    transition: color 0.3s;
}

.legal-nav-tabs a:hover {
    color: var(--accent-color);
    opacity: 1;
}

.legal-nav-tabs a.active {
    color: var(--accent-color);
}

.legal-nav-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
}

/* Legal Content Body */
.legal-content {
    color: var(--text-color);
}

.legal-content>p:first-child {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
}

.legal-content h2::before {
    content: "● ";
    font-size: 14px;
    color: var(--accent-color);
}

.legal-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.legal-content p {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 18px;
}

.legal-content ul {
    margin-left: 24px;
    margin-bottom: 30px;
    list-style-type: disc !important;
}

.legal-content li {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 10px;
    list-style-type: disc !important;
}

html[dir="rtl"] .legal-content,
html[dir="rtl"] .legal-page-header,
html[dir="rtl"] .legal-nav-tabs,
html[dir="rtl"] .language-switcher {
    direction: rtl;
}

html[dir="rtl"] .legal-content,
html[dir="rtl"] .legal-content p,
html[dir="rtl"] .legal-content h2,
html[dir="rtl"] .legal-content li {
    text-align: right;
}

/* Definition List (Tokushoho) */
.legal-dl {
    margin-top: 10px;
}

.legal-dl dt {
    font-size: 17px;
    font-weight: 700;
    margin-top: 36px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
    color: var(--text-color);
}

.legal-dl dt::before {
    content: "● ";
    font-size: 13px;
    color: var(--accent-color);
}

.legal-dl dd {
    font-size: 16px;
    line-height: 1.9;
    color: #444;
    margin-left: 0;
    padding-left: 20px;
    margin-bottom: 0;
}

/* Support Page */
.support-page {
    background:
        radial-gradient(circle at top, rgba(0, 113, 227, 0.12), transparent 32%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 48%, #f7f7f9 100%);
}

.support-hero {
    padding: 96px 20px 48px;
    text-align: center;
}

.support-eyebrow {
    color: var(--accent-color);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.support-hero h1 {
    font-size: 56px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.support-lead {
    max-width: 720px;
    margin: 0 auto;
    font-size: 20px;
    line-height: 1.8;
    color: var(--secondary-text);
}

.support-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 32px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
}

.primary-button {
    background: linear-gradient(135deg, #0071e3 0%, #0057b8 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(0, 113, 227, 0.24);
}

.primary-button:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    border: 1px solid rgba(29, 29, 31, 0.12);
}

.support-note {
    margin-top: 18px;
    font-size: 14px;
    color: var(--secondary-text);
}

.support-section {
    padding: 32px 20px 80px;
}

.support-section-alt {
    padding-top: 0;
}

.support-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.support-card,
.support-faq {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

.support-card h2,
.support-faq h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.support-card p,
.support-faq p {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.support-list {
    list-style: disc;
    padding-left: 20px;
}

.support-list li {
    margin-bottom: 12px;
    color: #444;
    line-height: 1.7;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {

    /* Main site */
    .hero h1 {
        font-size: 40px;
    }

    .app-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }

    .app-icon {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .support-hero {
        padding: 72px 16px 32px;
    }

    .support-hero h1 {
        font-size: 38px;
    }

    .support-lead {
        font-size: 17px;
    }

    .support-actions {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .support-grid {
        grid-template-columns: 1fr;
    }

    .support-card,
    .support-faq {
        padding: 24px 20px;
        border-radius: 22px;
    }

    /* Legal pages */
    .legal-section {
        padding: 60px 16px 80px;
    }

    .legal-page-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .legal-nav-tabs {
        flex-direction: column;
        align-items: stretch;
        border-bottom: none;
        margin-bottom: 40px;
    }

    .legal-nav-tabs a {
        text-align: center;
        padding: 12px 16px;
        border-bottom: 1px solid var(--border-color);
        font-size: 14px;
    }

    .legal-nav-tabs a.active::after {
        display: none;
    }

    .legal-nav-tabs a.active {
        background-color: #f0f4ff;
    }

    .legal-content h2 {
        font-size: 18px;
        margin-top: 36px;
    }

    .legal-content p,
    .legal-content li {
        font-size: 15px;
    }

    .legal-dl dt {
        font-size: 16px;
    }

    .legal-dl dd {
        font-size: 15px;
    }
}
