.url-check-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.url-check-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal */
.url-check-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 95%;
    max-width: 1000px;
    max-height: 90vh;
    background: #0D1116;
    border-radius: 12px;
    border: 1px solid #3d444d;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.url-check-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* Header */
.url-check-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #3d444d;
    background: #151B23;
}

.url-check-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0;
}

.url-check-title svg {
    color: #FF5A00;
}

.url-check-close-btn {
    background: transparent;
    border: none;
    color: #8b949e;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.url-check-close-btn:hover {
    color: #f0f6fc;
}

/* Body */
.url-check-body {
    padding: 24px 24px 0px 24px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Loading State */
.url-check-loading {
    text-align: center;
    padding: 40px 20px;
}

.url-check-loader {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-top: 45px solid #FF5A00;
    border-bottom: 45px solid #FF5A00;
    animation: hourglass-spin 2s ease-in-out infinite;
    margin: 0 auto 24px;
}

@keyframes hourglass-spin {
    0% { transform: rotate(0deg); }
    40% { transform: rotate(180deg); }
    60% { transform: rotate(180deg); }
    100% { transform: rotate(360deg); }
}

.url-check-loading-text {
    font-size: 18px;
    color: #f0f6fc;
    margin: 0 0 8px;
}

.url-check-loading-subtext {
    font-size: 14px;
    color: #8b949e;
    margin: 0;
}

/* Success State */
.url-check-success,
.url-check-no-urls {
    text-align: center;
    padding: 20px;
}

.url-check-success-icon {
    margin-bottom: 16px;
}

.url-check-success h3,
.url-check-no-urls h3 {
    font-size: 20px;
    color: #f0f6fc;
    margin: 0 0 8px;
}

.url-check-success p,
.url-check-no-urls p {
    font-size: 14px;
    color: #8b949e;
    margin: 0 0 24px;
}

/* Error State */
.url-check-error {
    text-align: left;
    padding: 20px;
}

.url-check-api-error {
    text-align: center;
    padding: 20px;
}

.url-check-error-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.url-check-error-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1 1 50%;
}

.url-check-error-left .url-check-error-icon {
    flex-shrink: 0;
}

.url-check-error-left .url-check-error-icon svg {
    width: 48px;
    height: 48px;
}

.url-check-error-text {
    flex: 1;
}

.url-check-error-text h3 {
    font-size: 18px;
    color: #f0f6fc;
    margin: 0 0 8px;
}

.url-check-error-text p {
    font-size: 13px;
    color: #8b949e;
    margin: 0;
    line-height: 1.5;
}

.url-check-api-error h3 {
    font-size: 20px;
    color: #f0f6fc;
    margin: 0 0 8px;
}

.url-check-api-error p {
    font-size: 14px;
    color: #8b949e;
    margin: 0 0 24px;
}

/* Stats */
.url-check-stats {
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 10px;
    flex: 0 0 50%;
}

.url-check-stat {
    text-align: center;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-width: 70px;
}

.url-check-stat .stat-value {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: #f0f6fc;
    margin-bottom: 2px;
}

.url-check-stat .stat-label {
    font-size: 12px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.url-check-stat.success .stat-value {
    color: #3fb950;
}

.url-check-stat.failed .stat-value {
    color: #f85149;
}

.url-check-stat.error .stat-value {
    color: #ffcd58;
}

/* Failed URL List */
.url-check-failed-list {
    text-align: left;
    margin-bottom: 19px;
}

.url-check-failed-list h4 {
    font-size: 14px;
    font-weight: 600;
    color: #f0f6fc;
    margin: 0 0 12px;
}

.failed-url-list {
    list-style: none;
    padding: 12px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: clamp(150px, 50vh, 500px);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 2px solid rgba(248, 81, 73, 0.2);
    position: relative;
}

/* Scrollbar styling */
.failed-url-list::-webkit-scrollbar {
    width: 8px;
}

.failed-url-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.failed-url-list::-webkit-scrollbar-thumb {
    background: rgba(248, 81, 73, 0.4);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.failed-url-list::-webkit-scrollbar-thumb:hover {
    background: rgba(248, 81, 73, 0.6);
}

/* Firefox scrollbar */
.failed-url-list {
    scrollbar-color: rgba(255, 222, 203, 0.4) rgba(255, 255, 255, 0.05);
    scrollbar-width: thin;
}

.failed-url-item {
    position: relative;
    padding: 12px;
    background: rgba(248, 81, 73, 0.1);
    border: 1px solid rgba(248, 81, 73, 0.3);
    border-radius: 8px;
}

.failed-url-item .page-chooser-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-block;
    padding: 2px 8px;
    background: rgba(255, 216, 88, 0.15);
    color: #ffd058;
    border: 1px solid rgba(255, 210, 88, 0.3);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.failed-url-item:last-child {
    margin-bottom: 0;
}

.failed-url-item .url {
    font-family: monospace;
    font-size: 13px;
    color: #f0f6fc;
    word-break: break-all;
    margin-bottom: 8px;
}

.failed-url-item .error-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.failed-url-item .error-badge {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(248, 81, 73, 0.2);
    color: #f85149;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.failed-url-item .source-info {
    font-size: 12px;
    color: #8b949e;
}

.failed-url-item .location-info {
    font-size: 11px;
    color: #6e7681;
    font-family: monospace;
    margin-bottom: 8px;
}

.failed-url-item .change-in-snippet-btn {
    display: inline-block;
    padding: 3px 9px;
    background-color: #FF5A00;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-top: 4px;
}

.failed-url-item .change-in-snippet-btn:hover {
    background-color: #fb7025;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Actions */
.url-check-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 0px 24px;
    position: sticky;
    bottom: 0;
}

.url-check-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.url-check-btn-primary {
    background: #FF5A00;
    color: #fff;
}

.url-check-btn-primary:hover {
    background: #fb7025;
}

.url-check-btn-secondary {
    background: transparent;
    border: 1px solid #3d444d;
    color: #8b949e;
}

.url-check-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f0f6fc;
}

.url-check-btn-warning {
    background: transparent;
    border: 1px solid rgba(248, 81, 73, 0.5);
    color: #f85149;
}

.url-check-btn-warning:hover {
    background: rgba(248, 81, 73, 0.1);
}

/* Responsive */
@media (max-width: 600px) {
    .url-check-modal {
        width: 95%;
        max-height: 90vh;
    }

    .url-check-stats {
        flex-wrap: wrap;
    }

    .url-check-stat {
        padding: 10px 16px;
    }

    .url-check-actions {
        flex-direction: column;
    }

    .url-check-btn {
        width: 100%;
    }
}

