/* ============================================
   CSSプロパティ完全チートシート - スタイルシート
   ============================================ */

/* リセット & ベーススタイル */
/* WordPress記事本文用: スコープを限定してテーマとの競合を回避 */
.css-properties-cheatsheet-container * {
    box-sizing: border-box;
}

:root {
    /* カラーパレット */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --accent-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* WordPress記事本文用: コンテナクラスでスコープを限定 */
.css-properties-cheatsheet-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeIn 0.5s ease-in;
}

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

/* ヘッダー */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(30px, 30px);
    }
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* 目次 */
.toc {
    background: var(--card-bg);
    padding: 30px 40px;
    border-bottom: 3px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.toc h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.toc ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0;
    margin: 0;
}

.toc li {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    border-radius: 25px;
    transition: all 0.3s ease;
}

.toc li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.toc a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.toc a:hover {
    color: #f0f0f0;
}

/* セクション */
.section {
    padding: 40px;
    animation: fadeInUp 0.6s ease-out;
}

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

.section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    position: relative;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--secondary-color);
    animation: expandWidth 0.8s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 100px;
    }
}

/* プロパティカード */
.prop-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.prop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    transition: width 0.3s ease;
}

.prop-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.prop-card:hover::before {
    width: 100%;
    opacity: 0.05;
}

.prop-card h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.syntax {
    background: #1e293b;
    color: #10b981;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    margin: 15px 0;
    overflow-x: auto;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.syntax code {
    color: #10b981;
    background: transparent;
}

.description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* デモコンテナ */
.demo-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.demo-box {
    background: #f8fafc;
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.demo-box:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
    transform: scale(1.02);
}

.demo-box.full-width {
    grid-column: 1 / -1;
}

.demo-box h4 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1rem;
    text-align: center;
    font-weight: 600;
}

/* プロパティ構造デモ */
.property-structure-demo {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 10px;
}

.structure-box {
    background: #1e293b;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.structure-code {
    color: #818cf8;
    margin: 5px 0;
}

.structure-property {
    margin: 10px 0 10px 20px;
    color: #e2e8f0;
}

.prop-name {
    color: #f472b6;
}

.prop-separator {
    color: #e2e8f0;
}

.prop-value {
    color: #10b981;
}

.prop-end {
    color: #e2e8f0;
}

/* Display デモ */
.display-demo {
    min-height: 80px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
}

.demo-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 5px;
    font-weight: 600;
}

.block-item {
    display: block;
}

.inline-item {
    display: inline;
}

.inline-block-item {
    display: inline-block;
    width: 120px;
}

/* Position デモ */
.position-demo {
    position: relative;
    min-height: 150px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
}

.relative-container {
    position: relative;
}

.pos-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
    margin: 5px;
}

.static-item {
    position: static;
}

.relative-item {
    position: relative;
    top: 10px;
    left: 20px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f472b6 100%);
}

.absolute-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #34d399 100%);
}

.fixed-item {
    /* 本来は position: fixed; だが、WP記事本文で画面全体に影響しないように
       デモでは position: absolute にしてデモ枠の右下に固定表示する */
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--warning-color) 0%, #fbbf24 100%);
}

.inset-demo {
    position: absolute;
    inset: 10px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f472b6 100%);
}

.inset-demo-2 {
    position: absolute;
    inset: 10px 30px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #34d399 100%);
}

/* Z-index デモ */
.z-index-demo {
    position: relative;
    min-height: 150px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
}

.z-item {
    position: absolute;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    width: 120px;
    text-align: center;
}

.z-1 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    top: 10px;
    left: 10px;
    z-index: 1;
}

.z-2 {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f472b6 100%);
    top: 30px;
    left: 30px;
    z-index: 2;
}

.z-3 {
    background: linear-gradient(135deg, var(--accent-color) 0%, #34d399 100%);
    top: 50px;
    left: 50px;
    z-index: 3;
}

/* Float デモ */
.float-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    min-height: 100px;
}

.float-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 10px;
}

.float-left {
    float: left;
    margin-right: 15px;
}

.float-right {
    float: right;
    margin-left: 15px;
}

.float-text {
    margin: 0;
    line-height: 1.6;
}

/* Overflow デモ */
.overflow-demo {
    width: 200px;
    height: 100px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
}

.overflow-content {
    width: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 10px;
    border-radius: 6px;
}

.overflow-visible {
    overflow: visible;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-scroll {
    overflow: scroll;
}

/* Size デモ */
.size-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    min-height: 80px;
}

.size-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.width-fixed {
    width: 200px;
}

.width-percent {
    width: 50%;
}

.width-fit {
    width: fit-content;
}

/* Margin デモ */
.margin-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    min-height: 100px;
}

.margin-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.margin-all {
    margin: 10px;
}

.margin-vertical-horizontal {
    margin: 10px 30px;
}

.margin-auto {
    margin: 0 auto;
    width: 150px;
}

/* Padding デモ */
.padding-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
    min-height: 100px;
}

.padding-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.padding-all {
    padding: 10px;
}

.padding-vertical-horizontal {
    padding: 10px 30px;
}

.padding-four {
    padding: 10px 20px 30px 40px;
}

/* Border デモ */
.border-item {
    padding: 20px;
    text-align: center;
    font-weight: 600;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    margin: 10px 0;
}

.border-solid {
    border: 2px solid var(--primary-color);
}

.border-dashed {
    border: 2px dashed var(--primary-color);
}

.border-dotted {
    border: 2px dotted var(--primary-color);
}

.border-double {
    border: 4px double var(--primary-color);
}

/* Border-radius デモ */
.radius-item {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto;
}

.radius-small {
    border-radius: 10px;
}

.radius-medium {
    border-radius: 20px;
}

.radius-circle {
    border-radius: 50%;
}

.radius-ellipse {
    border-radius: 10px 30px;
}

/* Box-sizing デモ */
.box-sizing-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 10px;
}

.box-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px;
    border: 5px solid var(--secondary-color);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
}

.content-box-item {
    box-sizing: content-box;
    width: 200px;
}

.border-box-item {
    box-sizing: border-box;
    width: 200px;
}

/* Typography デモ */
.font-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
}

.font-basic {
    font: 16px Arial, sans-serif;
}

.font-complex {
    font: italic bold 20px/1.5 serif;
}

.font-family-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
}

.font-serif {
    font-family: serif;
}

.font-sans {
    font-family: sans-serif;
}

.font-mono {
    font-family: monospace;
}

.font-size-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
}

.size-small {
    font-size: 12px;
}

.size-medium {
    font-size: 16px;
}

.size-large {
    font-size: 24px;
}

.font-weight-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
}

.weight-light {
    font-weight: 300;
}

.weight-normal {
    font-weight: 400;
}

.weight-bold {
    font-weight: 700;
}

.text-align-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
    min-height: 80px;
}

.align-left {
    text-align: left;
}

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

.align-right {
    text-align: right;
}

.align-justify {
    text-align: justify;
}

.line-height-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
    width: 200px;
}

.line-tight {
    line-height: 1.2;
}

.line-normal {
    line-height: 1.6;
}

.line-loose {
    line-height: 2;
}

.text-decoration-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.deco-underline {
    text-decoration: underline;
}

.deco-overline {
    text-decoration: overline;
}

.deco-line-through {
    text-decoration: line-through;
}

.text-transform-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.transform-upper {
    text-transform: uppercase;
}

.transform-lower {
    text-transform: lowercase;
}

.transform-capitalize {
    text-transform: capitalize;
}

.spacing-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.letter-wide {
    letter-spacing: 2px;
}

.word-wide {
    word-spacing: 10px;
}

/* Color デモ */
.color-demo {
    margin: 0;
    padding: 15px;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 8px;
    border: 2px dashed var(--primary-color);
    font-size: 18px;
    font-weight: 600;
}

.color-primary {
    color: #6366f1;
}

.color-secondary {
    color: #ec4899;
}

.color-accent {
    color: #10b981;
}

/* Background デモ */
.background-demo {
    padding: 40px;
    text-align: center;
    font-weight: 600;
    color: white;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-radial {
    background: radial-gradient(circle, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.bg-repeat {
    background: repeating-linear-gradient(45deg, var(--primary-color), var(--primary-color) 10px, var(--secondary-color) 10px, var(--secondary-color) 20px);
}

.bg-color-demo {
    padding: 30px;
    text-align: center;
    font-weight: 600;
    color: white;
    border-radius: 8px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-color-primary {
    background-color: #6366f1;
}

.bg-color-secondary {
    background-color: #ec4899;
}

.bg-color-transparent {
    background-color: rgba(16, 185, 129, 0.5);
    color: var(--text-primary);
}

/* Opacity デモ */
.opacity-demo {
    padding: 30px;
    text-align: center;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opacity-full {
    opacity: 1;
}

.opacity-half {
    opacity: 0.5;
}

.opacity-low {
    opacity: 0.2;
}

/* Transform デモ */
.transform-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transform-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
}

.transform-translate {
    transform: translate(20px, 10px);
}

.transform-rotate {
    transform: rotate(45deg);
}

.transform-scale {
    transform: scale(1.2);
}

.transform-skew {
    transform: skew(20deg);
}

/* Transition デモ */
.transition-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 30px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transition-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.transition-basic {
    transition: all 0.3s;
}

.transition-basic:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #f472b6 100%);
    transform: scale(1.1);
}

.transition-transform {
    transition: transform 0.5s ease;
}

.transition-transform:hover {
    transform: rotate(360deg) scale(1.2);
}

/* Animation デモ */
.animation-demo {
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 30px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animation-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
}

.animation-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.animation-bounce {
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animation-rotate {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Grid デモ */
.grid-demo {
    display: grid;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border: 2px dashed var(--primary-color);
    border-radius: 8px;
    padding: 15px;
    min-height: 150px;
}

.grid-item {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-three-col {
    grid-template-columns: 1fr 2fr 1fr;
}

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

/* Aspect Ratio デモ */
.aspect-demo {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 8px;
}

.aspect-wide {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.aspect-square {
    aspect-ratio: 1;
    width: 100%;
}

.aspect-classic {
    aspect-ratio: 4 / 3;
    width: 100%;
}

/* Filter デモ */
.filter-demo {
    padding: 30px;
    text-align: center;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 8px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-blur {
    filter: blur(5px);
}

.filter-grayscale {
    filter: grayscale(100%);
}

.filter-bright {
    filter: brightness(1.5);
}

/* Backdrop Filter デモ */
.backdrop-demo {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    padding: 40px;
    min-height: 150px;
    position: relative;
    overflow: hidden;
}

.backdrop-demo::before {
    content: 'Background Content';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.1) 10px, rgba(255, 255, 255, 0.1) 20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.3);
}

.backdrop-item {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    text-align: center;
}

/* Clip-path デモ */
.clip-path-demo {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto;
}

.clip-circle {
    clip-path: circle(50%);
}

.clip-polygon {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* 情報ボックス */
.info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    border-left: 5px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box p {
    margin-bottom: 15px;
    color: var(--text-primary);
}

/* フッター */
footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    text-align: center;
    padding: 30px;
    font-size: 1.1rem;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .css-properties-cheatsheet-container {
        margin: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 20px;
    }

    .section h2 {
        font-size: 1.8rem;
    }

    .prop-card {
        padding: 20px;
    }

    .demo-container {
        grid-template-columns: 1fr;
    }

    .toc ul {
        flex-direction: column;
    }

    .toc li {
        width: 100%;
    }
}

/* スクロールバーのスタイリング */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 10px;
    border: 2px solid #f1f5f9;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-color) 100%);
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 印刷スタイル */
@media print {
    .css-properties-cheatsheet-container {
        background: white;
        box-shadow: none;
    }

    .demo-container,
    .demo-box {
        break-inside: avoid;
    }
}

