:root {
    --bg-color: #050505;
    --text-color: #e5e5e5;
    --primary-color: #f59e0b; /* Tiger Orange */
    --primary-dim: rgba(245, 158, 11, 0.1);
    --secondary-color: #1f2937;
    --accent-color: #ffedd5;
    --border-color: #333;
    --terminal-bg: #0f1115;
    --card-bg: #111;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    margin-bottom: 40px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.tiger-icon {
    font-size: 1.5rem;
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--text-color);
}

.github-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    color: white !important;
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 0 40px; /* Adjusted padding */
    gap: 60px;
    text-align: center;
}

@media (min-width: 900px) {
    .hero {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
        align-items: flex-start;
    }
    .hero-content {
        max-width: 52%;
        padding-top: 20px;
    }
    .hero-visual {
        max-width: 46%;
        width: 100%;
        flex: 1;
    }
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
}

.highlight {
    color: var(--primary-color);
    background: linear-gradient(120deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    padding: 2px 6px;
    border-radius: 6px;
    display: inline-block;
}

.subtitle {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 40px;
    max-width: 600px;
}

/* CTA Group */
.cta-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

@media (min-width: 768px) {
    .cta-group {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: 52px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: black;
    border: 1px solid var(--primary-color);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.command-box {
    display: flex;
    align-items: center;
    background: #000;
    border: 1px solid #333;
    padding: 0 12px; /* Reduced padding */
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 0.85rem; /* Slightly smaller font */
    color: #ccc;
    gap: 10px;
    height: 52px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
    flex-grow: 1; /* Allow it to fill space if wrapped */
    min-width: 0; /* Enable shrinking for ellipsis */
}

.command-box .prompt {
    color: var(--primary-color);
    font-weight: bold;
    user-select: none;
    flex-shrink: 0;
}

.cmd-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1; /* Push copy button to the right */
}

.copy-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: white;
}

/* Terminal Visual */
.terminal-window {
    background: var(--terminal-bg);
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    width: 100%;
    text-align: left;
}

.terminal-header {
    background: #1a1c23;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    margin-right: auto;
    color: #666;
    font-size: 0.8rem;
}

.terminal-body {
    padding: 20px;
    color: #a0a0a0;
    min-height: 280px;
}

.line {
    margin-bottom: 6px;
}

.line.output {
    padding-left: 18px;
}

.line .cmd {
    color: #fff;
}

.line .green { color: #27c93f; }
.line .yellow { color: #ffbd2e; }
.line .blue { color: #61afef; }

.blinking-cursor {
    animation: blink 1s step-end infinite;
    display: inline-block;
    color: var(--primary-color);
    font-weight: bold;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Philosophy / Bento Grid */
.philosophy {
    padding: 40px 0; /* Adjusted padding */
}

.section-header {
    margin-bottom: 40px; /* Adjusted margin */
    text-align: center;
}

@media (min-width: 768px) {
    .section-header {
        text-align: left;
    }
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
}

.text-gradient {
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    color: #888;
    font-size: 1.1rem;
    max-width: 600px;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

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

.bento-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.3s;
    min-height: 240px;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.bento-card.large {
    grid-column: span 1;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.05), transparent 60%), var(--card-bg);
}

@media (min-width: 768px) {
    .bento-card.large {
        grid-row: span 2;
    }
    .bento-card.wide {
        grid-column: span 2;
        flex-direction: row;
        align-items: center;
    }
    .bento-card.wide .card-content {
        flex: 1;
        padding-right: 24px;
    }
    .bento-card.wide .card-visual {
        flex: 1;
        margin-top: 0;
    }
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #fff;
}

.card-content p {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Visuals inside cards */
.card-visual {
    margin-top: 24px;
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Lease & Judge Visuals */
.lease-visual, .judge-visual {
    height: 120px;
    background: rgba(0,0,0,0.2);
    border: none;
}

.lease-core {
    filter: drop-shadow(0 0 5px rgba(245, 158, 11, 0.3));
}

.graph-visual {
    height: auto;
    flex: 1;
    min-height: 200px;
    position: relative;
    border: none;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 24px;
}

.graph-visual svg {
    display: block;
    width: 100%;
    height: 100%;
}

.animated-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: dash 4s linear infinite;
}

@keyframes dash {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0.5;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.5;
    }
}

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

@keyframes pulse-point {
    0% { r: 4; opacity: 0.8; }
    50% { r: 6; opacity: 1; }
    100% { r: 4; opacity: 0.8; }
}

.code-snippet {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #aaa;
}

.code-line { margin-bottom: 4px; }
.indent { padding-left: 20px; }
.kwd { color: #c678dd; }


/* Architecture Loop */
.architecture {
    padding: 60px 0; /* Adjusted padding */
    text-align: center;
}

.architecture h2 {
    font-size: 2rem;
    margin-bottom: 60px;
}

.cycle-visual-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
}

.cycle-visual-container svg {
    overflow: visible;
}

.node circle, .node rect {
    transition: stroke 0.3s;
}

.node:hover circle, .node:hover rect {
    stroke: var(--primary-color);
}

/* Final CTA */
.cta-section {
    padding: 60px 0 80px;
}

.cta-card {
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 60%), #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

@media (min-width: 900px) {
    .cta-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.cta-content p {
    color: #888;
    max-width: 540px;
}

.cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px 0 30px;
    color: #666;
    margin-top: 60px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    font-size: 0.85rem;
    color: #444;
}

/* モバイル/タブレット対応（デスクトップは変更しない） */
@media (max-width: 900px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    nav {
        flex-wrap: wrap;
        gap: 16px;
    }

    .hero {
        gap: 36px;
    }

    h1 {
        font-size: 2.4rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .terminal-body {
        min-height: 240px;
        font-size: 0.8rem;
    }

    .terminal-window {
        max-width: 100%;
    }

    .bento-card.wide {
        flex-direction: column;
        align-items: flex-start;
    }

    .cycle-visual-container {
        overflow-x: auto;
    }

    .cycle-visual-container svg {
        min-width: 800px;
    }

    .cta-card {
        padding: 28px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }

    header {
        margin-bottom: 24px;
    }

    .logo {
        font-size: 1.1rem;
    }

    nav {
        width: 100%;
    }

    .github-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    h1 {
        font-size: 1.9rem;
    }

    .hero {
        padding-top: 32px;
    }

    .hero-content {
        width: 100%;
        text-align: left;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .command-box {
        width: 100%;
    }

    .cta-actions {
        width: 100%;
    }

    .terminal-body {
        min-height: 220px;
    }
}
