:root {
    --primary-color: #0052cc;
    --primary-light: #e6f0ff;
    --primary-dark: #0747a6;
    --secondary-color: #6c757d;
    --text-color: #343a40;
    --text-muted: #6c757d;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --sidebar-text: #343a40;
    --sidebar-active-bg: #e6f0ff;
    --sidebar-active-text: #0052cc;
    --border-color: #e9ecef;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
    --header-height: 80px;
    --sidebar-width: 280px;
    --font-heading: 'Outfit', 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: #1a1a1a;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.2s ease;
}

/* Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* image logo replaces text */
.logo-img {
    height: 1.5rem;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    /* kept for fallback but hidden when image is present */
    display: none;
}

.logo-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 0.95rem;
    border-right: 3px solid transparent;
}

.nav-link i {
    width: 20px;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.nav-link:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-right: 3px solid var(--primary-color);
}

.nav-link.active i {
    color: var(--primary-color);
}

.sidebar-footer {
    padding: 1.5rem 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* ensure any logo images in the sidebar footer fit within the container */
.sidebar-footer img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0; /* align left */
}

/* also constrain logos used in the main footer */
.main-footer img {
    max-width: 3rem;
    height: auto;
    vertical-align: middle;
}

.support-link {
    display: block;
    margin-top: 0.5rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem 4rem;
    max-width: 1200px;
}

.content-header {
    margin-bottom: 4rem;
}

.header-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.content-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
}

/* Sections */
.content-section {
    margin-bottom: 5rem;
    scroll-margin-top: 100px;
}

.content-section h2 {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-section h2 i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Cards */
.section-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.section-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.section-card p {
    margin-bottom: 1.25rem;
}

/* Features */
.feature-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.08);
}

.feature-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sub-feature {
    margin-top: 1.5rem;
}

.sub-feature h4 {
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.benefit-list {
    list-style: none;
    margin-top: 1rem;
}

.benefit-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.benefit-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.feature-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.detail-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: 12px;
}

.detail-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Feature Grid Mini */
.feature-grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.feature-item-mini i {
    color: #28a745;
}

/* Info Boxes */
.info-box {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box.warning {
    background-color: #fff9db;
    border-color: #fcc419;
    color: #856404;
}

.info-box.important {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.info-box h5 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Tables */
.spec-table {
    width: 100%;
    border-collapse: collapse;
}

.spec-table tr {
    border-bottom: 1px solid var(--border-color);
}

.spec-table th {
    text-align: left;
    padding: 1rem;
    width: 200px;
    color: var(--text-muted);
    font-weight: 600;
}

.spec-table td {
    padding: 1rem;
    font-weight: 500;
}

/* Steps */
.step-list {
    margin-top: 2rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* License Grid */
.license-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.license-item {
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 12px;
}

.license-note {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

.cta-box {
    text-align: center;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 204, 0.3);
}

/* Usage List */
.usage-list {
    margin-left: 1.5rem;
}

.usage-list li {
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.usage-tabs .tab {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

/* UI Grid */
.ui-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.ui-item {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.ui-item:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.ui-item h4 {
    margin-bottom: 0.5rem;
}

/* FAQ */
.faq-item {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
}

.faq-question::before {
    content: "Q. ";
    color: var(--primary-color);
}

.faq-answer::before {
    content: "A. ";
    color: #28a745;
    font-weight: 800;
}

/* Terms */
.update-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.terms-content h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.main-footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
    }

    .logo-text,
    .logo-badge,
    .nav-link span,
    .sidebar-footer p,
    .sidebar-footer a {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        padding: 2rem;
    }

    .nav-link {
        padding: 1rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

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