/* ===================================================
   pCloud完全攻略 - Design System CSS
   Version: 1.0.0
   Author: Manus AI for Takeo Fujii
   =================================================== */

/* --- CSS Custom Properties --- */
:root {
  --primary: #0076FE;
  --primary-dark: #0056b3;
  --primary-light: #e8f4ff;
  --text: #1A1A2E;
  --text-muted: #6C757D;
  --bg: #F8F9FA;
  --card: #FFFFFF;
  --border: #E9ECEF;
  --green: #34A853;
  --orange: #FF9900;
  --red: #EA4335;
  --dropbox-blue: #0061FF;
  --gdrive-green: #34A853;
  --onedrive-blue: #0078D4;
  --icloud-gray: #A2AAAD;
  --font-ja: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
  --font-en: 'Segoe UI', 'Roboto', sans-serif;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 32px;
  --space-xl: 64px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 50px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
  --max-width: 960px;
  --content-width: 720px;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ja);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: var(--primary-dark); }

/* --- Layout --- */
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.content-area { max-width: var(--content-width); margin: 0 auto; }

/* --- Header --- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.site-logo img { height: 32px; width: auto; }
.site-logo span { color: var(--text); font-weight: 400; font-size: 0.85rem; }

.main-nav { display: flex; gap: var(--space-lg); align-items: center; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  padding: var(--space-sm) 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.nav-cta {
  background: var(--primary) !important;
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-full) !important;
  border-bottom: none !important;
  font-size: 0.85rem !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; transform: translateY(-1px); }

/* Mobile Nav */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--card);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-md);
    box-shadow: var(--shadow-lg);
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { display: flex; }
}

/* --- Hero Section (Top Page) --- */
.hero {
  background: linear-gradient(135deg, #0076FE 0%, #0056b3 50%, #003d80 100%);
  color: #fff;
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}
.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}
.hero .cta-button { background: #fff; color: var(--primary); }
.hero .cta-button:hover { background: #f0f0f0; }

@media (max-width: 768px) {
  .hero { padding: var(--space-lg) 0; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
}

/* --- Article Page --- */
.article-header {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}
.article-header .category-badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  padding: 4px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}
.article-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: var(--space-md);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.article-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .article-header h1 { font-size: 1.6rem; }
  .article-header { padding: var(--space-lg) 0 var(--space-md); }
}

/* --- Article Content --- */
.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-xl);
}
.article-content h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: var(--space-xl) 0 var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--primary);
  line-height: 1.4;
}
.article-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: var(--space-lg) 0 var(--space-md);
  padding-left: var(--space-md);
  border-left: 4px solid var(--primary);
  line-height: 1.4;
}
.article-content p {
  margin-bottom: var(--space-md);
  font-size: 1rem;
  line-height: 1.9;
}
.article-content strong { color: var(--text); font-weight: 700; }
.article-content em { font-style: italic; }

.article-content ul, .article-content ol {
  margin: var(--space-md) 0;
  padding-left: var(--space-lg);
}
.article-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.8;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-lg) 0;
  font-size: 0.95rem;
}
.article-content th, .article-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.article-content th {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.article-content tr:nth-child(even) { background: var(--bg); }
.article-content tr:hover { background: var(--primary-light); }

@media (max-width: 768px) {
  .article-content h2 { font-size: 1.4rem; }
  .article-content h3 { font-size: 1.15rem; }
  .article-content table { font-size: 0.85rem; }
  .article-content th, .article-content td { padding: 8px 10px; }
}

/* --- CTA Box --- */
.cta-box {
  background: linear-gradient(135deg, #0076FE 0%, #0056b3 100%);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  color: #fff;
  margin: var(--space-xl) 0;
}
.cta-box h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
  border: none;
  padding: 0;
  color: #fff;
}
.cta-box p { opacity: 0.9; margin-bottom: var(--space-md); }
.cta-button {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 14px 40px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.05rem;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  color: var(--primary-dark);
}
.cta-disclaimer {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: var(--space-sm);
}

/* --- Info Box / Alert --- */
.info-box {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-lg) 0;
}
.info-box.warning {
  background: #fff8e1;
  border-color: var(--orange);
}
.info-box.danger {
  background: #fdecea;
  border-color: var(--red);
}
.info-box-title {
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

/* --- Comparison Card --- */
.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.comparison-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: all 0.3s;
}
.comparison-card.recommended {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(0,118,254,0.15);
  position: relative;
}
.comparison-card.recommended::before {
  content: 'おすすめ';
  position: absolute;
  top: -12px;
  right: 16px;
  background: var(--primary);
  color: #fff;
  padding: 2px 16px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}
.comparison-card h4 { font-size: 1.1rem; margin-bottom: var(--space-sm); }
.comparison-card .price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

/* --- TOC (Table of Contents) --- */
.toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-lg) 0;
}
.toc-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.toc ol { padding-left: var(--space-lg); }
.toc li { margin-bottom: var(--space-sm); }
.toc a {
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 2px;
}
.toc a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* --- Author Box --- */
.author-box {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin: var(--space-xl) 0;
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--primary-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}
.author-info h4 { font-size: 1rem; margin-bottom: var(--space-xs); }
.author-info .author-title { color: var(--text-muted); font-size: 0.85rem; margin-bottom: var(--space-sm); }
.author-info p { font-size: 0.9rem; line-height: 1.7; }

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

/* --- Related Articles --- */
.related-articles {
  margin: var(--space-xl) 0;
}
.related-articles h2 {
  font-size: 1.4rem;
  margin-bottom: var(--space-lg);
  text-align: center;
  border-bottom: none;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}
.related-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.related-card-body { padding: var(--space-md); }
.related-card-body .category {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}
.related-card-body h3 { font-size: 1rem; margin-top: var(--space-xs); line-height: 1.5; }

/* --- Footer --- */
.site-footer {
  background: var(--text);
  color: #fff;
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: auto;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.footer-about h3 { font-size: 1.1rem; margin-bottom: var(--space-md); color: var(--primary); }
.footer-about p { font-size: 0.9rem; opacity: 0.8; line-height: 1.7; }
.footer-links h4 { font-size: 0.9rem; margin-bottom: var(--space-md); opacity: 0.6; text-transform: uppercase; letter-spacing: 1px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a { color: #fff; opacity: 0.8; font-size: 0.9rem; }
.footer-links a:hover { opacity: 1; color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-lg);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.6;
}
.footer-bottom a { color: #fff; }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

/* --- Breadcrumb --- */
.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 var(--space-sm); }

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s;
  z-index: 99;
}
.scroll-top:hover { transform: translateY(-2px); background: var(--primary-dark); }
.scroll-top.visible { display: flex; }

/* --- Print Styles --- */
@media print {
  .site-header, .site-footer, .cta-box, .scroll-top, .main-nav { display: none; }
  body { background: #fff; }
  .article-content { max-width: 100%; }
}
