body { 
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background-color: #f3f4f6;
    color: #1f2937;
}

.gradient-text {
    background: linear-gradient(to right, #4F46E5, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

main.tool-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    width: 100%;
    flex-grow: 1;
}

h1.tool-title {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-weight: 300;
    font-size: 2.25rem;
    line-height: 2.5rem;
}

/* フォーム関連のスタイル */
form {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

textarea#urls, input[type="text"], input[type="password"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
}

textarea#urls { 
    min-height: 120px; 
    resize: vertical; 
}

.checkbox-container { 
    margin-bottom: 1rem; 
    display: flex; 
    align-items: center; 
}

.checkbox-container input[type="checkbox"] { 
    width: auto; 
    margin-right: 0.5rem; 
}

.checkbox-container label { 
    margin-bottom: 0; 
    font-weight: normal; 
}

.basic-auth-fields {
    display: none;
    padding: 1rem;
    border: 1px dashed #9ca3af;
    border-radius: 0.375rem;
    margin-top: 0.75rem;
    background-color: #f9fafb;
}

.basic-auth-fields.active { 
    display: flex; 
    gap: 1rem; 
    flex-wrap: wrap; 
}

.basic-auth-fields > div { 
    flex: 1; 
    min-width: 200px; 
}

input[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

input[type="submit"]:hover { 
    background-color: #2563eb; 
}

input[type="submit"]:disabled { 
    background-color: #6b7280; 
    cursor: not-allowed; 
}

/* 結果テーブルのスタイル */
.results-container { 
    margin-top: 2rem; 
    overflow-x: auto; 
}

.results-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 1rem; 
    background-color: #fff; 
    border-radius: 0.5rem; 
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1); 
    overflow:hidden; 
}

.results-table th, .results-table td { 
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.9em;
    word-break: break-all;
    max-width: 350px;
}

.results-table th { 
    background-color: #f9fafb; 
    font-weight: 600; 
    color: #374151; 
}

.results-table td .url a { 
    color: #2563eb; 
    text-decoration: underline; 
}

.results-table td .url a:hover { 
    color: #1d4ed8; 
}

/* タグ表示のスタイル */
.tag-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag-item {
    padding: 0.25rem 0.5rem;
    margin: 0.25rem 0;
    border-radius: 0.25rem;
    font-size: 0.85em;
    word-wrap: break-word;
}

.tag-item.ga4 { 
    background-color: #dbeafe; 
    border-left: 3px solid #3b82f6; 
}

.tag-item.gtm { 
    background-color: #dcfce7; 
    border-left: 3px solid #16a34a; 
}

.tag-item.gtm-complete { 
    background-color: #dcfce7; 
    border-left: 3px solid #16a34a; 
    border: 2px solid #16a34a;
}

.tag-item.legacy { 
    background-color: #f3f4f6; 
    border-left: 3px solid #6b7280; 
}

.tag-item.error { 
    background-color: #fee2e2; 
    border-left: 3px solid #dc2626; 
}

.tag-item.location-warning { 
    background-color: #fef3c7; 
    border-left: 3px solid #f59e0b; 
    animation: pulse 2s infinite;
}

.tag-item.external { 
    background-color: #f0f9ff; 
    border-left: 3px solid #0ea5e9; 
}

/* ステータス色 */
.status-200, .status-2xx.status-200 { color: #16a34a !important; }
.status-3xx { color: #d97706; }
.status-4xx, .status-5xx, .status-error { color: #dc2626; }
.status-error { font-weight: bold; }
.status-info { color: #4b5563; }
.tag-detected { color: #16a34a; font-weight: 600; }
.tag-warning { color: #d97706; font-weight: 600; }
.tag-error { color: #dc2626; font-weight: 600; }
.tag-legacy { color: #6b7280; font-weight: 600; }
.location-correct { color: #16a34a; font-size: 0.75em; }
.location-incorrect { color: #f59e0b; font-size: 0.75em; }

/* 通知メッセージ */
.notice { 
    padding: 0.75rem 1rem; 
    margin-bottom: 1.5rem; 
    border: 1px solid transparent; 
    border-radius: 0.375rem; 
}

.notice-info { 
    color: #0c5460; 
    background-color: #d1ecf1; 
    border-color: #bee5eb; 
}

.notice-danger { 
    color: #721c24; 
    background-color: #f8d7da; 
    border-color: #f5c6cb; 
}

/* ローディングインジケータ */
#loadingIndicator { 
    display: none; 
    text-align: center; 
    padding: 1.25rem; 
    font-size: 1.1em; 
    color: #2563eb; 
}

.spinner {
    margin: 0 auto 0.75rem auto;
    width: 28px; height: 28px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* サイト内コンテンツリンク */
.site-content-links {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);
}

.site-content-links h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: #111827;
    font-weight: 500;
    font-size: 1.5rem;
}

.site-content-links ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .site-content-links ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

.site-content-links li a {
    display: block;
    padding: 1rem;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    text-decoration: none;
    color: #1d4ed8;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.site-content-links li a:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .results-table th, .results-table td { 
        font-size: 0.85em; 
        padding:0.5rem 0.75rem; 
        max-width: 250px;
    }
    h1.tool-title { font-size: 1.875rem; }
    main.tool-container { max-width: 100%; padding: 1rem; }
}

@media (max-width: 600px) {
    .basic-auth-fields.active { flex-direction: column; }
    h1.tool-title { font-size: 1.5rem; }
    .results-table th, .results-table td { 
        font-size: 0.8em;
        max-width: 200px;
    }
    .site-content-links ul {
        grid-template-columns: repeat(1, 1fr);
    }
}