/* zftbr.top - Japanese Style Theme */

:root {
    --primary: #BC002D;
    --primary-dark: #8B001F;
    --secondary: #FFFFFF;
    --accent: #F5F5F5;
    --text: #333333;
    --text-light: #666666;
    --border: #E0E0E0;
    --success: #2E7D32;
    --error: #C62828;
    --shadow: rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --max-width: 1200px;
}

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

body {
    font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--secondary);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--primary);
    color: var(--secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--secondary);
    text-decoration: none;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background: var(--accent);
}

.btn-secondary {
    background: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

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

/* Stats */
.stats {
    padding: 3rem 0;
    background: var(--accent);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--text-light);
}

/* Sections */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

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

.category-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.category-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

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

.tool-card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.tool-card:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px var(--shadow);
}

.tool-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tool-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Features */
.features {
    background: var(--accent);
}

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

.feature {
    text-align: center;
    padding: 1.5rem;
}

.feature h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    text-align: center;
}

.cta h2 {
    color: var(--secondary);
}

.cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: var(--text);
    color: var(--secondary);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col a {
    color: var(--secondary);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.7;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--secondary);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

/* Tool Detail Page */
.tool-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.tool-section {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.tool-section h2 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-align: left;
}

/* Form Elements */
input, textarea, select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(188, 0, 45, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button {
    cursor: pointer;
    font-family: inherit;
}

.btn-tool {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-tool:hover {
    background: var(--primary-dark);
}

.btn-tool-secondary {
    background: var(--accent);
    color: var(--text);
}

.btn-tool-secondary:hover {
    background: var(--border);
}

/* Tool Result */
.result-box {
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    margin-top: 1rem;
    font-family: monospace;
    word-break: break-all;
}

.result-box:empty {
    display: none;
}

/* Tool Grid in Category */
.tools-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.tools-list .tool-card {
    padding: 1.25rem;
}

/* Article Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s;
}

.article-card:hover {
    box-shadow: 0 5px 20px var(--shadow);
    transform: translateY(-3px);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card .content {
    padding: 1.5rem;
}

.article-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.article-card .meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Article Detail */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.article-content img {
    max-width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.article-content h2 {
    color: var(--primary);
    margin: 2rem 0 1rem;
    text-align: left;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: 1rem 0 1rem 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary);
        padding: 1rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

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

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

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.flex {
    display: flex;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
