body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background-color: #f7f9fc;
    color: #333;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 95%;
    max-width: 800px;
    text-align: center;
    position: relative;
}

h1 {
    color: #4a90e2;
    font-size: 24px;
    margin-bottom: 20px;
}

.result-box {
    background-color: #e8f4fd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.result-box strong {
    font-size: 28px;
    color: #d0021b;
}

.small {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    box-sizing: border-box;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 15px;
}

textarea:focus {
    border-color: #4a90e2;
    outline: none;
}

button {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #357abd;
}

/* トップページ用のリンクボタン */
.tool-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.btn-link {
    display: block;
    background-color: #fff;
    color: #4a90e2;
    border: 2px solid #4a90e2;
    padding: 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.3s;
}

.btn-link:hover {
    background-color: #4a90e2;
    color: #fff;
}

.btn-link.disabled {
    border-color: #ccc;
    color: #999;
    background-color: #f9f9f9;
    cursor: not-allowed;
}

.btn-link.disabled:hover {
    background-color: #f9f9f9;
    color: #999;
}

.back-link {
    position: absolute;
    top: -30px;
    left: 0;
    color: #4a90e2;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

/* 広告エリア */
.ad-area {
    margin: 20px auto;
    text-align: center;
    min-height: 90px; /* 広告のガタつき防止 */
    display: flex;
    justify-content: center;
    overflow: hidden;
}

/* パスワード生成ツール用 */
.pass-form {
    text-align: left;
    margin: 0 auto;
    max-width: 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input[type="number"] {
    width: 80px;
    padding: 8px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.checkbox-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    transform: scale(1.3);
    margin-right: 10px;
}

.copy-btn {
    background-color: #2ecc71;
    font-size: 14px;
    padding: 8px 20px;
    margin-top: 15px;
    display: inline-block;
}

.copy-btn:hover {
    background-color: #27ae60;
}

/* タイマー用 */
.timer-display {
    background-color: #333;
    color: #0f0; /* デジタル時計っぽい緑色 */
    font-family: 'Courier New', Courier, monospace;
    font-size: 60px;
    font-weight: bold;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    letter-spacing: 5px;
}

.timer-controls {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.timer-controls button {
    padding: 15px 30px;
    font-size: 18px;
}

.btn-primary { background-color: #4a90e2; }
.btn-primary:hover { background-color: #357abd; }
.btn-danger { background-color: #e74c3c; }
.btn-danger:hover { background-color: #c0392b; }
.btn-secondary { background-color: #95a5a6; }
.btn-secondary:hover { background-color: #7f8c8d; }

.timer-controls button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.timer-adjust {
    background-color: #f1f2f6;
    padding: 15px;
    border-radius: 8px;
}

.timer-adjust p {
    margin-top: 0;
    font-weight: bold;
    color: #555;
}

.adjust-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.adjust-row button {
    padding: 8px 12px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
    border: 2px solid #ccc;
    border-radius: 5px;
}

.adjust-row button:hover {
    background-color: #e2e2e2;
}

.adjust-spacer {
    width: 20px;
}

/* カスタム時間入力用 */
.custom-time-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
}

.custom-time-inputs input[type="number"] {
    width: 60px;
    padding: 8px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    text-align: center;
}

.custom-time-inputs label {
    margin-right: 10px;
    font-weight: bold;
}

.custom-time-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.custom-time-buttons button {
    padding: 8px 15px;
    font-size: 14px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white;
}
