/* ドメインパワー＆検索順位チェッカー - メインスタイル */

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* ヘッダー */
.site-header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: #34495e;
    color: white;
}

/* メインコンテンツ */
.main-content {
    min-height: calc(100vh - 140px);
    padding: 2rem 0;
}

/* カード */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.card__header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
}

.card__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card__subtitle {
    opacity: 0.9;
    font-size: 0.9rem;
}

.card__body {
    padding: 2rem;
}

/* フォーム */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e6ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* ボタン */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.btn--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn--secondary {
    background-color: #6c757d;
    color: white;
}

.btn--secondary:hover {
    background-color: #5a6268;
}

.btn--success {
    background-color: #28a745;
    color: white;
}

.btn--danger {
    background-color: #dc3545;
    color: white;
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn--block {
    width: 100%;
}

/* テーブル */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table--striped tbody tr:nth-child(odd) {
    background-color: #f8f9fa;
}

/* アラート */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ローディング */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 順位変化 */
.rank-up {
    color: #28a745;
    font-weight: 600;
}

.rank-down {
    color: #dc3545;
    font-weight: 600;
}

.rank-same {
    color: #6c757d;
}

.rank-new {
    color: #007bff;
    font-weight: 600;
}

.rank-none {
    color: #adb5bd;
}

/* ステータス */
.status-mock {
    color: #ffc107;
    font-weight: 600;
}

.status-live {
    color: #28a745;
    font-weight: 600;
}

/* グリッドレイアウト */
.grid {
    display: grid;
    gap: 2rem;
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ユーティリティ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* フッター */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem 0;
    text-align: center;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-nav ul {
        justify-content: center;
    }
    
    .card__body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .grid--2,
    .grid--3 {
        grid-template-columns: 1fr;
    }
}