﻿/* ツール共通スタイル */
body {
    overflow-y: auto !important;
    /* main.cssのapp-lockを上書き */
    height: auto !important;
}

/* 入出力エリア */
.tool-workspace {
    background: var(--bg-panel);
    /* 背景を明確にする */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    /* mainの角丸と合わせる */
    padding: 2.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    /* はみ出し防止 */
}

/* テキストエリアのモダン化 */
.tool-textarea {
    width: 100%;
    min-height: 300px;
    background: var(--bg-app);
    /* ワークスペースより暗い */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s;
    margin-top: 1.5rem;
}

/* Reusable Components for Tools */
.btn-mini-mode {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    /* Slightly larger padding */
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    /* Orange Gradient */
    border: none;
    border-radius: 999px;
    /* Pill shape */
    color: white;
    font-size: 0.95rem;
    /* Slightly larger text */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px -1px rgba(234, 88, 12, 0.3);
}

.btn-mini-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(234, 88, 12, 0.4);
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    /* Keep gradient on hover */
    color: white;
    /* Keep text white */
}

.btn-mini-mode svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Stats/Controls Grid */
.tool-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Modern Button Styles */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #4a4a4a;
    /* Lighter on hover */
    border-color: var(--text-muted);
    transform: translateY(-1px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-app);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    border-color: var(--text-muted);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    /* Changed to white for better readability */
    display: block;
    margin-bottom: 0.5rem;
    overflow-wrap: break-word;
    /* Prevent overflow */
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Range Sliders and Checkboxes */
.control-group {
    margin-bottom: 1.5rem;
}

.control-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Article/Content Area for SEO */
.tool-article {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tool-article h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.tool-article h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1.25rem;
    color: var(--text-primary);
}

.tool-article p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.tool-article ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.tool-article li {
    margin-bottom: 0.5rem;
}
