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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.input-section {
    margin-bottom: 20px;
}

.input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-section input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.input-section input:focus {
    outline: none;
    border-color: #3498db;
}

.preset-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.preset-btn {
    padding: 8px 16px;
    background: #ecf0f1;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #3498db;
    color: white;
}

.result-section {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.result-card h2 {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-card h2::before {
    font-size: 1.2rem;
}

.result-card:first-child h2::before {
    content: '';
}

.result-card:last-child h2::before {
    content: '';
}

#cron-meaning {
    font-size: 1.3rem;
    color: #2c3e50;
    font-weight: 600;
}

.from-date-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.from-date-section label {
    font-size: 0.9rem;
    color: #666;
}

.from-date-section input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.reset-btn {
    padding: 6px 12px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.reset-btn:hover {
    background: #2980b9;
}

#next-runs {
    list-style: none;
}

#next-runs li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-family: 'Courier New', Courier, monospace;
    color: #555;
}

#next-runs li:last-child {
    border-bottom: none;
}

#next-runs li::before {
    content: '•';
    color: #3498db;
    margin-right: 10px;
}

/* ナビゲーション */
.nav-link {
    text-align: center;
    margin-bottom: 20px;
}

.nav-link a {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
}

.nav-link a:hover {
    text-decoration: underline;
}

/* 説明ページ */
.explain-section {
    margin-bottom: 30px;
}

.explain-section h2 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #3498db;
}

.explain-section p {
    color: #555;
    margin-bottom: 12px;
}

.cron-diagram {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.cron-fields {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cron-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cron-field .field-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    background: white;
    border: 2px solid #3498db;
    border-radius: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cron-field .field-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.explain-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.explain-table th,
.explain-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.explain-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    font-size: 0.85rem;
}

.explain-table td code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
}

.cron-link {
    text-decoration: none;
}

.cron-link:hover code {
    background: #3498db;
    color: white;
}

.example-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.example-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.example-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 6px;
}

.example-card code {
    display: inline-block;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 6px;
}

.example-card p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.cta-section {
    text-align: center;
    padding: 20px;
    border-top: 1px solid #eee;
}

.cta-section p {
    color: #666;
    margin-bottom: 12px;
}

.cta-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-btn:hover {
    background: #2980b9;
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.3rem;
    }

    .input-section input {
        font-size: 1rem;
    }

    .preset-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .cron-fields {
        gap: 8px;
    }

    .cron-field .field-value {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .explain-table th,
    .explain-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }
}
