@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
}

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

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5em;
    color: #1a237e;
    margin: 0;
}

#time-container {
    font-size: 1.5em;
    font-weight: bold;
    color: #555;
}

/* 検索コンテナ */
.search-container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    text-align: center;
}

.search-container form {
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-input {
    width: 60%;
    padding: 12px 20px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 24px 0 0 24px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: #1a237e;
}

.search-button {
    padding: 12px 20px;
    font-size: 1em;
    border: 1px solid #1a237e;
    background-color: #1a237e;
    color: white;
    cursor: pointer;
    border-radius: 0 24px 24px 0;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #303f9f;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-item {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.grid-item h2 {
    margin-top: 0;
    /* border-bottomとpadding-bottomをwidget-headerに移動 */
    margin-bottom: 0;
    color: #1a237e;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 2px solid #1a237e;
    padding-bottom: 10px;
}

.grid-item.wide {
    grid-column: span 2;
}

/* クイックアクセス */
.site-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.site-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.site-link:hover {
    background-color: #e8eaf6;
}

.site-icon-container {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.site-icon-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.site-name {
    font-size: 0.8em;
    text-align: center;
    word-break: break-all;
}

/* 天気 */
.weather-content {
    text-align: center;
}
.weather-temp {
    font-size: 2.5em;
    font-weight: bold;
    margin: 10px 0;
}

.weather-settings {
    display: flex;
    gap: 5px;
    align-items: center;
}

#weather-location-input {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8em;
    width: 100px; /* 幅を固定 */
}

#weather-location-save {
    border: none;
    background-color: #303f9f;
    color: white;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.2s;
}
#weather-location-save:hover {
    background-color: #1a237e;
}

/* メモ */
#note-preview-content {
    white-space: pre-wrap;
    font-size: 0.9em;
    max-height: 150px;
    overflow-y: auto;
}

/* ニュース */
#news-widget ul {
    list-style-type: none;
    padding: 0;
}
#news-widget li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
#news-widget li a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}
#news-widget li a:hover {
    color: #1a237e;
    text-decoration: underline;
}
#news-widget small {
    color: #777;
    white-space: nowrap; /* 日付が改行されないように */
}