/* Main Wrapper */
.wpwc-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #333;
}

/* Search Box */
.wpwc-search-box {
    background: #f0f0f1; /* Grey background as requested */
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.wpwc-input-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

#wpwc-url-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

#wpwc-analyze-btn {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#wpwc-analyze-btn:hover {
    background: #135e96;
}

#wpwc-error-msg {
    color: #d63638;
    margin-top: 10px;
}

/* Results Container */
.wpwc-results-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

/* Tabs */
.wpwc-tabs {
    background: #f0f0f1; /* Grey tab bar */
    display: flex;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
}

.wpwc-tab-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.wpwc-tab-btn.active {
    background: #fff;
    color: #2271b1;
    border-bottom: 3px solid #2271b1;
}

.wpwc-tab-content {
    display: none;
    padding: 20px;
}

.wpwc-tab-content.active {
    display: block;
}

/* Cards Grid */
.wpwc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.wpwc-card {
    background: #f9f9f9; /* Light grey cards */
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #eee;
}

.wpwc-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #777;
    text-transform: uppercase;
}

.wpwc-big-num {
    display: block;
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
}

.wpwc-alert {
    color: #d63638;
}

/* Lists and Details */
.wpwc-detail-row {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.wpwc-headings-list .wpwc-h-item {
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f1;
}

.wpwc-h-item .tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    margin-right: 5px;
    min-width: 25px;
    text-align: center;
}

.tag.h1 { background: #d63638; }
.tag.h2 { background: #e67e22; }
.tag.h3 { background: #f1c40f; color: #333; }
.tag.h4 { background: #27ae60; }
.tag.h5 { background: #2980b9; }
.tag.h6 { background: #8e44ad; }

.wpwc-link-list, #res-keywords-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wpwc-link-list li, #res-keywords-list li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    overflow-wrap: break-word;
}

.kwd {
    font-weight: bold;
    color: #2271b1;
}

/* Loader */
.wpwc-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#wpwc-loader {
    text-align: center;
    padding: 20px;
    color: #555;
    font-size: 18px;
}

/* Mobile Friendly */
@media (max-width: 600px) {
    .wpwc-input-group {
        flex-direction: column;
    }
    .wpwc-tabs {
        flex-wrap: wrap;
    }
    .wpwc-tab-btn {
        flex: none;
        width: 50%; /* 2 per row */
    }
}
