/* style.css */
:root {
    --primary-color: #3498db;
    --primary-color-dark: #2980b9;
    --text-color: #333;
    --light-text-color: #777;
    --bg-color: #f4f7f9;
    --white-color: #fff;
    --border-color: #e0e6ed;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --font-family: 'Noto Sans JP', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- ヘッダー --- */
.header {
    background-color: var(--white-color);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* --- ヒーローセクション --- */
.hero {
    background-color: var(--white-color);
    text-align: center;
    padding: 80px 20px;
}

.hero h1 {
    font-size: 36px;
    margin-top: 0;
    margin-bottom: 10px;
}

.hero p {
    font-size: 18px;
    color: var(--light-text-color);
    margin-bottom: 30px;
}

.search-form {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    width: 100%;
    padding: 15px 60px 15px 20px;
    font-size: 16px;
    border-radius: 30px;
    border: 2px solid var(--border-color);
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 45px;
    border: none;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.search-form button:hover {
    background-color: var(--primary-color-dark);
}

/* --- Daily Content Section --- */
.daily-content {
    background-color: #e9f5ff;
    padding: 40px 20px;
}

.ai-content-box {
    background-color: var(--white-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow);
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ai-content-box p {
    font-size: 18px;
    font-weight: 500;
    line-height: 1.8;
    margin: 0;
    color: var(--text-color);
}

.ai-content-box .quote-author {
    display: block;
    margin-top: 15px;
    font-size: 14px;
    font-weight: normal;
    color: var(--light-text-color);
}

.spinner-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/* --- トップページ：ツールセクション --- */
.tool-category {
    padding: 60px 0 0 0;
}

.tool-category:last-of-type {
    padding-bottom: 60px;
}

.category-title {
    font-size: 28px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.tool-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.tool-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.tool-title {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.tool-description {
    font-size: 14px;
    color: var(--light-text-color);
    margin: 0;
}

/* --- フッター --- */
.footer {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white-color);
    border-top: 1px solid var(--border-color);
    color: var(--light-text-color);
    font-size: 14px;
}

/* --- レスポンシブ対応 --- */
@media (max-width: 900px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    .header-container,
    .container {
        width: 95%;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 16px;
    }

    .category-title {
        font-size: 22px;
    }
}

@media (max-width: 600px) {
    .tool-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-nav {
        display: none;
    }
}