/* 共通スタイル - 5-tips.com */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2c3e50;
    min-height: 100vh;
}

/* ヘッダー */
header {
    background: #ffffff;
    color: #2c3e50;
    padding: 30px;
    text-align: center;
    border-bottom: 3px solid #3498db;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.site-name {
    font-size: 1.2em;
    color: #3498db;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

h1 {
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #2c3e50;
}

.subtitle {
    color: #7f8c8d;
    font-size: 0.9em;
    font-weight: normal;
    letter-spacing: 1px;
}

.back-button {
    position: absolute;
    left: 20px;
    top: 20px;
    color: #3498db;
    text-decoration: none;
    font-size: 0.9em;
    border: 2px solid #3498db;
    padding: 8px 15px;
    border-radius: 5px;
    letter-spacing: 1px;
    transition: all 0.3s;
    background: #ffffff;
}

.back-button:hover {
    background: #3498db;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

/* 2ペインレイアウト */
.main-container {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
}

/* 左側：ツールエリア */
.tool-area {
    flex: 1;
    min-width: 0;
}

.container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.content {
    padding: 40px;
}

/* 右側：サイドバー */
.sidebar-area {
    width: 320px;
    flex-shrink: 0;
}

.sidebar-sticky {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 広告ブロック */
.ad-block {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.ad-placeholder {
    color: #95a5a6;
    text-align: center;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* ニュースセクション */
.news-section {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.news-header {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-header::before {
    content: "📰";
    font-size: 1.2em;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.news-item {
    padding: 12px;
    border-radius: 5px;
    background: #f8f9fa;
    transition: all 0.3s;
    border-left: 3px solid #3498db;
}

.news-item:hover {
    background: #e8f4f8;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
}

.news-item a {
    text-decoration: none;
    color: #2c3e50;
    display: block;
}

.news-title {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-source {
    font-size: 0.75em;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-time {
    font-size: 0.7em;
    color: #95a5a6;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.error {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
    font-size: 0.9em;
}

/* セクションタイトル */
.section-title {
    color: #2c3e50;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.2em;
    letter-spacing: 1px;
    border-left: 4px solid #3498db;
    padding-left: 12px;
}

/* フッター */
footer {
    background: #ffffff;
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9em;
    border-top: 3px solid #3498db;
    letter-spacing: 1px;
    margin-top: 20px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .sidebar-area {
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar-sticky {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .ad-block, .news-section {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .back-button {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
    }
    
    .sidebar-sticky {
        flex-direction: column;
        align-items: center;
    }
    
    .ad-block, .news-section {
        width: 100%;
    }
}
