/* Ranking Checker v1.0.1 */

.rc-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Card */
.rc-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 40px 40px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.10);
}

.rc-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}

.rc-subtitle {
    font-size: 15px;
    color: #8a94a6;
    margin: 0 0 32px;
}

/* Fields */
.rc-field-group { margin-bottom: 22px; }

.rc-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #6b7a99;
    margin-bottom: 8px;
}

.rc-hint { font-weight: 400; letter-spacing: 0; text-transform: none; }

.rc-wrap input[type="text"].rc-input,
.rc-wrap select.rc-input {
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1.5px solid #e4e9f2 !important;
    border-radius: 10px !important;
    padding: 0 18px !important;
    font-size: 15px !important;
    color: #1a1a2e !important;
    background: #f7f9fc !important;
    outline: none !important;
    height: 50px !important;
    box-shadow: none !important;
    line-height: 50px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    transition: border-color .2s, background .2s;
}

.rc-wrap input[type="text"].rc-input:focus,
.rc-wrap select.rc-input:focus {
    border-color: #2254a3 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.rc-wrap select.rc-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7a99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 44px !important;
}

/* Keyword row */
.rc-kw-row { display: flex; gap: 10px; align-items: center; }
.rc-kw-row .rc-input { flex: 1; }

.rc-wrap .rc-btn-add {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    flex-shrink: 0 !important;
    border-radius: 10px !important;
    border: none !important;
    background: #2254a3 !important;
    color: #fff !important;
    font-size: 22px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background .2s, transform .1s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    vertical-align: top !important;
}

.rc-btn-add:hover  { background: #1a4280; }
.rc-btn-add:active { transform: scale(.95); }

/* Pills */
.rc-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

.rc-pill {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #eef2fb;
    border: 1px solid #c8d5ef;
    border-radius: 4px;
    padding: 0 5px 0 8px;
    font-size: 11px;
    color: #2254a3;
    font-weight: 500;
    height: 22px;
    line-height: 22px;
}

.rc-pill-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #8a94a6;
    font-size: 12px;
    line-height: 1;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.rc-pill-remove:hover { color: #e74c3c; }

/* Primary Button */
.rc-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 24px;
    background: #2254a3;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    margin-top: 8px;
    transition: background .2s, transform .1s;
}

.rc-btn-primary:hover    { background: #1a4280; }
.rc-btn-primary:active   { transform: scale(.98); }
.rc-btn-primary:disabled { background: #a0b4d6; cursor: not-allowed; }

/* Loading */
.rc-loading {
    text-align: center;
    padding: 40px 0 20px;
    color: #6b7a99;
    font-size: 15px;
}

.rc-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #e4e9f2;
    border-top-color: #2254a3;
    border-radius: 50%;
    animation: rc-spin .8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes rc-spin { to { transform: rotate(360deg); } }
.rc-dots { animation: rc-blink 1.4s infinite; }
@keyframes rc-blink { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Results */
.rc-results { margin-top: 28px; }

.rc-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 0 4px;
}

.rc-results-domain { font-size: 16px; font-weight: 700; color: #1a1a2e; }
.rc-results-meta   { font-size: 13px; color: #8a94a6; }

/* Result rows */
.rc-list { display: flex; flex-direction: column; gap: 10px; }

.rc-row {
    background: #fff;
    border-radius: 15px;
    border: 1.5px solid #e4e9f2;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color .15s, box-shadow .15s;
}

.rc-row:hover { border-color: #c8d5ef; box-shadow: 0 2px 12px rgba(34,84,163,.07); }

.rc-row-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}

.rc-badge-top3  { background: #2254a3; }
.rc-badge-top10 { background: #2254a3; }
.rc-badge-low   { background: #2254a3; }
.rc-badge-none  { background: #2254a3; font-size: 11px; }
.rc-badge-err   { background: #e74c3c; font-size: 11px; }

.rc-row-content  { flex: 1; min-width: 0; }

.rc-row-kw {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-row-url {
    font-size: 12px;
    color: #2254a3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.rc-row-status     { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.rc-status-good    { color: #27ae60; font-weight: 600; }
.rc-status-mid     { color: #e67e22; font-weight: 600; }
.rc-status-bad     { color: #e74c3c; font-weight: 600; }

.rc-info-btn {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #c8d5ef;
    background: #eef2fb;
    color: #2254a3;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, border-color .15s;
}

.rc-info-btn:hover { background: #2254a3; color: #fff; border-color: #2254a3; }

/* Modal overlay */
.rc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.rc-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    animation: rc-modal-in .18s ease;
}

@keyframes rc-modal-in {
    from { opacity:0; transform: scale(.96) translateY(8px); }
    to   { opacity:1; transform: scale(1)   translateY(0); }
}

.rc-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1.5px solid #e4e9f2;
    flex-shrink: 0;
}

.rc-modal-badge {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rc-modal-badge          { background: #2254a3; }
.rc-modal-badge.pos-mid  { background: #2254a3; }
.rc-modal-badge.pos-bad  { background: #2254a3; }
.rc-modal-badge.pos-none { background: #2254a3; font-size: 12px; }

.rc-modal-titles { flex: 1; min-width: 0; }

.rc-modal-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #8a94a6;
    text-transform: uppercase;
    display: block;
}

.rc-modal-kw {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid #e4e9f2;
    background: #f7f9fc;
    color: #6b7a99;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}

.rc-modal-close:hover { background: #ffe5e5; color: #e74c3c; border-color: #f5c6cb; }

/* Modal body */
.rc-modal-body {
    overflow-y: auto;
    padding: 20px 24px 24px;
    flex: 1;
}

.rc-serp-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid #f0f3f8;
}

.rc-serp-item:last-child { border-bottom: none; }

.rc-serp-item.is-me {
    background: #f0faf4;
    border-radius: 12px;
    padding: 13px 14px;
    margin: 4px -14px;
    border: 1.5px solid #a8e6bf;
}

.rc-serp-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    color: #fff;
}

.rc-serp-info   { flex: 1; min-width: 0; }

.rc-serp-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-serp-item.is-me .rc-serp-title { color: #1e8449; }

.rc-serp-link {
    font-size: 12px;
    color: #2254a3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    text-decoration: none;
}

.rc-serp-link:hover { text-decoration: underline; }

.rc-serp-snippet {
    font-size: 12px;
    color: #6b7a99;
    margin-top: 4px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rc-serp-me-badge {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
    border-radius: 50px;
    padding: 2px 8px;
    margin-left: 6px;
    vertical-align: middle;
}

.rc-modal-loading {
    text-align: center;
    padding: 40px 0;
    color: #6b7a99;
}

.rc-not-found-note {
    text-align: center;
    padding: 24px 0 8px;
    color: #8a94a6;
    font-size: 14px;
}

.rc-error-box {
    background: #fff3f3;
    border: 1.5px solid #f5c6c6;
    border-radius: 12px;
    padding: 16px 20px;
    color: #c0392b;
    font-size: 14px;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .rc-card  { padding: 24px 20px 28px; }
    .rc-title { font-size: 21px; }
    .rc-modal { max-height: 92vh; }
}

/* Two-column field row */
.rc-field-row {
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
}

.rc-field-row .rc-field-group { margin-bottom: 0; }
.rc-field-half { flex: 1; min-width: 0; }

/* Neue Abfrage button */
.rc-btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px auto 0;
    padding: 10px 24px;
    background: transparent;
    color: #2254a3;
    border: 1.5px solid #c8d5ef;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.rc-btn-reset:hover { background: #eef2fb; border-color: #2254a3; }

@media (max-width: 500px) {
    .rc-field-row { flex-direction: column; gap: 0; }
    .rc-field-row .rc-field-group { margin-bottom: 22px; }
}

/* ---- Tabs (Local Checker style) ---- */
.rc-tabs {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.10);
    margin-bottom: 20px;
    width: fit-content;
}

.rc-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #6b7a99;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.rc-tab:hover { background: #f0f4fb; color: #2254a3; }

.rc-tab.rc-tab-active {
    background: #2254a3;
    color: #fff;
}

/* ---- History Panel ---- */
.rc-history-panel { margin-top: 0; }

.rc-history-empty {
    text-align: center;
    padding: 50px 20px;
    color: #8a94a6;
    font-size: 15px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
}

.rc-history-domain {
    background: #fff;
    border-radius: 15px;
    border: 1.5px solid #e4e9f2;
    margin-bottom: 16px;
    overflow: hidden;
}

.rc-history-domain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: #f7f9fc;
    border-bottom: 1.5px solid #e4e9f2;
    cursor: pointer;
}

.rc-history-domain-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
}

.rc-history-domain-meta {
    font-size: 12px;
    color: #8a94a6;
}

.rc-history-kw-list { padding: 8px 0; }

.rc-history-kw-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    border-bottom: 1px solid #f0f3f8;
}

.rc-history-kw-row:last-child { border-bottom: none; }

.rc-history-kw-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    min-width: 0;
}

.rc-history-sparkline {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
    flex-shrink: 0;
}

.rc-history-bar {
    width: 10px;
    border-radius: 3px 3px 0 0;
    background: #2254a3;
    opacity: 0.7;
    transition: opacity .15s;
    cursor: default;
    position: relative;
}

.rc-history-bar:hover { opacity: 1; }

.rc-history-pos-current {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #2254a3;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rc-history-trend {
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    width: 40px;
    text-align: right;
}

.rc-trend-up   { color: #27ae60; }
.rc-trend-down { color: #e74c3c; }
.rc-trend-same { color: #8a94a6; }

.rc-history-date {
    font-size: 11px;
    color: #8a94a6;
    flex-shrink: 0;
    width: 80px;
    text-align: right;
}

.rc-history-clear-btn {
    background: none;
    border: 1px solid #e4e9f2;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: #8a94a6;
    cursor: pointer;
    transition: all .15s;
}

.rc-history-clear-btn:hover { border-color: #e74c3c; color: #e74c3c; }
