/* Main Tester Styles */
.compatibility-tester {
    margin-bottom: 2rem;
}

.tester-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.config-panel,
.results-panel {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e5e7eb);
}

.panel-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.panel-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary, #1f2937);
}

.panel-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted, #6b7280);
    margin: 0;
}

/* Input Group */
.input-group {
    margin-bottom: 2rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary, #1f2937);
    margin-bottom: 0.75rem;
}

.label-icon {
    font-size: 1.125rem;
}

.url-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--input-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    transition: all 0.2s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-hint {
    font-size: 0.8125rem;
    color: var(--text-muted, #6b7280);
    margin-top: 0.5rem;
}

/* Selection Groups */
.selection-group {
    margin-bottom: 2rem;
}

.selection-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary, #1f2937);
    margin-bottom: 1rem;
}

/* Browser Grid */
.browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.browser-option {
    position: relative;
    cursor: pointer;
}

.browser-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.browser-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #ffffff);
    transition: all 0.2s ease;
}

.browser-option:hover .browser-card {
    border-color: var(--primary-color, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.browser-option input[type="checkbox"]:checked + .browser-card {
    border-color: var(--primary-color, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

.browser-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.chrome-icon {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc04 100%);
}

.firefox-icon {
    background: linear-gradient(135deg, #ff7139 0%, #ff9500 100%);
}

.safari-icon {
    background: linear-gradient(135deg, #007aff 0%, #00c7ff 100%);
}

.edge-icon {
    background: linear-gradient(135deg, #0078d4 0%, #00bcf2 100%);
}

.opera-icon {
    background: linear-gradient(135deg, #ff1b2d 0%, #cc0000 100%);
}

.ie-icon {
    background: linear-gradient(135deg, #1ba0e2 0%, #0078d4 100%);
}

.browser-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

/* Resolution Grid */
.resolution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.resolution-option {
    position: relative;
    cursor: pointer;
}

.resolution-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.resolution-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    background: var(--card-bg, #ffffff);
    transition: all 0.2s ease;
}

.resolution-option:hover .resolution-card {
    border-color: var(--primary-color, #3b82f6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resolution-option input[type="checkbox"]:checked + .resolution-card {
    border-color: var(--primary-color, #3b82f6);
    background: rgba(59, 130, 246, 0.05);
}

.resolution-icon {
    font-size: 1.5rem;
}

.resolution-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.resolution-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

.resolution-size {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
    gap: 0.75rem;
}

.feature-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    cursor: pointer;
    transition: all 0.2s ease;
}

.feature-option:hover {
    border-color: var(--primary-color, #3b82f6);
    background: rgba(59, 130, 246, 0.02);
}

.feature-option input[type="checkbox"] {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color, #3b82f6);
}

.feature-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

/* Action Group */
.action-group {
    margin-top: 2rem;
}

.test-button {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-color, #3b82f6) 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.test-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.test-button:active {
    transform: translateY(0);
}

.test-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.button-icon {
    font-size: 1.125rem;
}

/* Results Panel */
.results-content {
    min-height: 400px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted, #6b7280);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--text-primary, #1f2937);
}

.empty-state p {
    font-size: 0.9375rem;
    margin: 0;
    max-width: 400px;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color, #e5e7eb);
    border-top-color: var(--primary-color, #3b82f6);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-state p {
    font-size: 0.9375rem;
    color: var(--text-muted, #6b7280);
    margin: 0;
}

/* Results Display */
.test-summary {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.test-summary h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-primary, #1f2937);
}

.summary-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.8125rem;
    color: var(--text-muted, #6b7280);
}

.summary-value {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary, #1f2937);
}

.browser-result {
    background: var(--card-bg, #ffffff);
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.browser-result:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.browser-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.browser-result-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.browser-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.score-badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
}

.score-badge.excellent {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.score-badge.good {
    background: rgba(251, 191, 36, 0.1);
    color: #ca8a04;
}

.score-badge.poor {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.score-progress {
    height: 8px;
    background: var(--border-color, #e5e7eb);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.score-progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.score-progress-bar.excellent {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.score-progress-bar.good {
    background: linear-gradient(90deg, #fbbf24 0%, #f59e0b 100%);
}

.score-progress-bar.poor {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.result-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #6b7280);
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.feature-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.feature-badge.supported {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.feature-badge.unsupported {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.action-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    color: var(--text-primary, #1f2937);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-button:hover {
    background: var(--border-color, #e5e7eb);
}

.action-button.primary {
    background: var(--primary-color, #3b82f6);
    color: #ffffff;
    border-color: var(--primary-color, #3b82f6);
}

.action-button.primary:hover {
    background: #2563eb;
}

/* Info Panel */
.info-panel {
    background: var(--card-bg, #ffffff);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e5e7eb);
}

.info-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color, #e5e7eb);
}

.info-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary, #1f2937);
}

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

.info-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--text-primary, #1f2937);
}

.compatibility-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.compatibility-list li {
    font-size: 0.875rem;
    color: var(--text-muted, #6b7280);
    line-height: 1.6;
}

.compatibility-list strong {
    color: var(--text-primary, #1f2937);
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .tester-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .config-panel,
    .results-panel,
    .info-panel {
        padding: 1.5rem;
    }

    .browser-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .resolution-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .summary-info {
        grid-template-columns: 1fr;
    }

    .info-content {
        grid-template-columns: 1fr;
    }

    .result-actions {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .browser-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .panel-header h2 {
        font-size: 1.25rem;
    }

    .test-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
}