/* 深緑とゴールドの配色 */
:root {
    --primary-color: #065f46;      /* 深緑 */
    --secondary-color: #f59e0b;     /* ゴールド */
    --accent-color: #d97706;        /* 濃いゴールド */
    --background: #f0fdf4;          /* 薄い緑の背景 */
    --card-bg: #ffffff;             /* 白 */
    --text-color: #1f2937;          /* ダークグレー */
    --border-color: #d1fae5;        /* 薄い緑の境界 */
    --success-color: #10b981;       /* 緑 */
    --warning-color: #f59e0b;       /* 警告色 */
    --error-color: #ef4444;         /* エラー色 */
    --recommended-bg: #ecfdf5;      /* 推奨項目の背景 */
    --recommended-border: #10b981;  /* 推奨項目の境界 */
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(6, 95, 70, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    flex: 1;
}

.tool-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.3s ease;
    font-family: 'Courier New', monospace;
    background: #fafafa;
}

textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.input-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
}

.clear-btn {
    background: var(--error-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.clear-btn:hover {
    background: #dc2626;
}

.hash-results {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.hash-item {
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.hash-item.recommended {
    background: var(--recommended-bg);
    border-color: var(--recommended-border);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.hash-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hash-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 15px;
}

.hash-header h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.hash-info {
    font-size: 0.85rem;
    color: #666;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.copy-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: auto;
    transition: background-color 0.3s ease;
}

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

.copy-btn.copied {
    background: var(--success-color);
}

.hash-output {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    min-height: 50px;
    display: flex;
    align-items: center;
    color: #374151;
    line-height: 1.4;
}

.hash-output:empty::before {
    content: "ハッシュ値がここに表示されます...";
    color: #9ca3af;
    font-style: italic;
}

.format-options {
    margin-bottom: 30px;
}

.format-options h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.format-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.format-btn {
    background: white;
    border: 2px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

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

.format-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.info-section {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 2px solid var(--border-color);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.info-item.highlight {
    background: var(--recommended-bg);
    border-left-color: var(--recommended-border);
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-item p {
    color: #666;
    line-height: 1.5;
}

.usage-examples {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 10px;
}

.usage-examples h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.usage-examples ul {
    list-style: none;
    padding: 0;
}

.usage-examples li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: #555;
}

.usage-examples li::before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.security-notice {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.security-notice h3 {
    color: #92400e;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.security-notice ul {
    list-style: none;
    padding: 0;
}

.security-notice li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #78350f;
    line-height: 1.5;
}

.security-notice li::before {
    content: "⚠️";
    position: absolute;
    left: 0;
}

footer {
    margin-top: 50px;
    text-align: center;
    color: #666;
}

.ad-space {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 2px dashed #86efac;
}

.ad-space p {
    color: #16a34a;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tool-section {
        padding: 20px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .input-options {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .format-buttons {
        justify-content: center;
    }
    
    .hash-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .copy-btn {
        margin-left: 0;
    }
}