/* Architecture Validator Section */
.architecture-validator-section {
    margin-bottom: 2rem;
}

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

.validator-panel {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.validator-panel:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.input-panel .panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.results-panel .panel-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.panel-icon svg {
    color: #ffffff;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
}

.panel-body {
    padding: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    color: #374151;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.textarea-wrapper {
    position: relative;
}

.code-input {
    width: 100%;
    padding: 1rem;
    font-size: 0.875rem;
    
    line-height: 1.6;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #f9fafb;
    color: #374151;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.code-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #ffffff;
}

.code-input::placeholder {
    color: #9ca3af;
}

.char-count {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Results Container */
.results-container {
    min-height: 200px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #9ca3af;
}

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

.empty-icon svg {
    color: #9ca3af;
}

.empty-text {
    font-size: 0.9375rem;
    margin: 0;
    max-width: 300px;
}

/* Validation Results */
.validation-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    padding: 1.25rem;
    border-radius: 12px;
    border-left: 4px solid;
    background: #f9fafb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-item.pass {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.result-item.fail {
    border-left-color: #ef4444;
    background: #fef2f2;
}

.result-item.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.result-item.info {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

.result-item.pass .result-icon {
    background: #10b981;
    color: #ffffff;
}

.result-item.fail .result-icon {
    background: #ef4444;
    color: #ffffff;
}

.result-item.warning .result-icon {
    background: #f59e0b;
    color: #ffffff;
}

.result-item.info .result-icon {
    background: #3b82f6;
    color: #ffffff;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    flex: 1;
}

.result-message {
    font-size: 0.875rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
}

.result-details {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.8125rem;
    color: #6b7280;
}

.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 #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-text {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0;
}

/* Summary Stats */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 12px;
}

.summary-stat {
    text-align: center;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-stat.pass .summary-value {
    color: #10b981;
}

.summary-stat.fail .summary-value {
    color: #ef4444;
}

.summary-stat.warning .summary-value {
    color: #f59e0b;
}

/* Architecture Info Section */
.architecture-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

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

.pattern-list li {
    font-size: 0.875rem;
    color: #4b5563;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.pattern-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .validator-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .architecture-validator-section {
        margin-top: 1.5rem;
    }

    .validator-container {
        gap: 1rem;
    }

    .panel-header {
        padding: 1.25rem;
    }

    .panel-body {
        padding: 1.25rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .architecture-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

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

@media (max-width: 480px) {
    .panel-title {
        font-size: 1.125rem;
    }

    .form-select,
    .code-input {
        font-size: 0.875rem;
    }

    .results-summary {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .summary-value {
        font-size: 1.5rem;
    }
}
