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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f8ff;
    min-height: 100vh;
    padding: 20px;
    color: #14171a;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(29, 161, 242, 0.1);
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1 {
    text-align: center;
    color: #1da1f2;
    margin-bottom: 10px;
    font-size: 1.8em;
}

h1 img {
    width: 48px;
    height: 48px;
    vertical-align: middle;
}

.subtitle {
    text-align: center;
    color: #657786;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f5f8fa;
    border-radius: 15px;
    border: 2px solid #e1e8ed;
    transition: all 0.3s ease;
}

.section:hover {
    border-color: #1da1f2;
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.1);
}

.section-title {
    font-size: 1.3em;
    color: #14171a;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon {
    font-size: 1.5em;
}

.help-text {
    color: #657786;
    font-size: 0.9em;
    margin-bottom: 10px;
    line-height: 1.5;
}

input[type="text"], input[type="number"], input[type="date"], select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, select:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}

.search-button {
    width: 100%;
    padding: 20px;
    background: #1da1f2;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-button:hover {
    background: #1a91da;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(29, 161, 242, 0.3);
}

.search-button:active {
    transform: translateY(-1px);
}

.preview {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4fd;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.9em;
    word-break: break-all;
    color: #14171a;
    border: 2px solid #cce7f8;
}

.keyword-type {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.keyword-type button {
    padding: 8px 15px;
    border: 2px solid #e1e8ed;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.keyword-type button.active {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.keyword-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.keyword-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.keyword-row input {
    flex: 1;
    margin-bottom: 0;
}

.add-button, .remove-button {
    padding: 8px 15px;
    border: 2px solid #1da1f2;
    background: white;
    color: #1da1f2;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-button:hover {
    background: #1da1f2;
    color: white;
}

.remove-button {
    border-color: #e0245e;
    color: #e0245e;
    padding: 8px 12px;
}

.remove-button:hover {
    background: #e0245e;
    color: white;
}

.connector {
    font-weight: bold;
    color: #1da1f2;
    padding: 0 10px;
    white-space: nowrap;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.emoji {
    font-style: normal;
}

/* フィルターグリッド用のスタイル */
.filter-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 20px;
}

.filter-label {
    font-weight: 500;
    color: #14171a;
    font-size: 1.1em;
}

.filter-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    min-width: 100px;
    background: white;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    text-align: center;
}

.radio-item:hover {
    border-color: #1da1f2;
    transform: translateY(-2px);
}

.radio-item.active {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.radio-item input[type="radio"] {
    display: none;
}

.radio-item span {
    font-weight: 500;
    width: 100%;
}

/* 履歴セクション用のスタイル */
.history-section {
    margin-top: 30px;
    padding: 25px;
    background: #f9fafb;
    border-radius: 15px;
    border: 2px solid #e1e8ed;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 15px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e1e8ed;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    border-color: #1da1f2;
    box-shadow: 0 5px 15px rgba(29, 161, 242, 0.1);
    transform: translateX(5px);
}

.history-query {
    font-family: monospace;
    font-size: 0.9em;
    color: #14171a;
    word-break: break-all;
    flex: 1;
    margin-right: 15px;
}

.history-date {
    font-size: 0.8em;
    color: #657786;
    white-space: nowrap;
}

.delete-history {
    padding: 5px 10px;
    background: #e0245e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.delete-history:hover {
    background: #cc1f4e;
}

.clear-all-history {
    margin-top: 15px;
    padding: 10px 20px;
    background: #657786;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.clear-all-history:hover {
    background: #4a5568;
}

.no-history {
    text-align: center;
    color: #657786;
    padding: 20px;
    font-style: italic;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .section {
        padding: 15px;
    }
    
    .date-inputs {
        grid-template-columns: 1fr;
    }
    
    .keyword-row {
        flex-wrap: wrap;
    }
    
    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-date {
        margin-top: 10px;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filter-options {
        justify-content: stretch;
    }
    
    .radio-item {
        flex: 1;
        justify-content: center;
    }
}

.description {
    margin-top: 20px;
    color: #444;
    font-size: 14px;
}

.footer {
    margin: 20px 0;
    color: #888;
    font-size: 14px;
    text-align: center;
}
.footer a {
    color: #000;
}
