/* Super Compact SSL Checker */
.psc-checker {
    max-width: 680px;
    margin: 25px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header */
.psc-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 15px;
}

.psc-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.psc-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* Input Form */
.psc-form {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    padding: 0 15px;
}

#psc-domain {
    flex: 1;
    padding: 13px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
    background: #ffffff;
    color: #1e293b;
}

#psc-domain:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#psc-domain::placeholder {
    color: #94a3b8;
}

#psc-check-btn {
    padding: 13px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

#psc-check-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

#psc-check-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

#psc-check-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.psc-loading {
    text-align: center;
    padding: 35px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    margin: 0 15px;
}

.psc-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 12px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.psc-loading p {
    margin: 0;
    font-size: 14px;
    color: #475569;
    font-weight: 600;
}

/* Result Card */
.psc-result-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 6px 28px rgba(15, 23, 42, 0.08);
    animation: slideUp 0.4s ease-out;
    margin: 0 15px;
    border: 1px solid #f1f5f9;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(18px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Status Badge */
.psc-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 17px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.psc-status-valid {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.psc-status-invalid {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.psc-status-icon {
    font-size: 26px;
}

/* Alert */
.psc-alert {
    padding: 11px 15px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 13px;
    border-left: 4px solid;
}

.psc-alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left-color: #f59e0b;
    color: #92400e;
}

.psc-alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left-color: #ef4444;
    color: #991b1b;
}

/* Info Grid - 3 Columns */
.psc-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.psc-info-item {
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border-left: 3px solid #667eea;
    transition: all 0.3s;
}

.psc-info-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.12);
}

.psc-info-item label {
    display: block;
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
    font-weight: 700;
}

.psc-info-item strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
    line-height: 1.3;
}

.psc-days {
    color: #10b981 !important;
    font-size: 16px !important;
}

/* Domains - Reduced Gap */
.psc-domains {
    margin: 15px 0 10px 0;
    padding: 14px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border: 2px solid #bae6fd;
}

.psc-domains strong {
    display: block;
    margin-bottom: 9px;
    color: #0c4a6e;
    font-size: 13px;
    font-weight: 700;
}

.psc-domain-tag {
    display: inline-block;
    padding: 5px 13px;
    background: white;
    border: 2px solid #0ea5e9;
    border-radius: 18px;
    margin: 3px 5px 3px 0;
    font-size: 12px;
    color: #0369a1;
    font-weight: 600;
    transition: all 0.2s;
}

.psc-domain-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
}

/* Accordions - Fixed Left Aligned with Icon */
.psc-technical {
    margin-top: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.psc-technical:hover {
    border-color: #cbd5e1;
}

.psc-technical summary {
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    user-select: none;
    transition: all 0.3s;
    list-style: none;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.psc-technical summary::-webkit-details-marker {
    display: none;
}

.psc-accordion-icon {
    flex-shrink: 0;
    font-size: 16px;
    line-height: 1;
}

.psc-accordion-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.psc-technical summary:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.psc-technical[open] summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.psc-tech-content {
    padding: 16px;
    background: #ffffff;
}

.psc-tech-content p {
    margin: 0 0 12px 0;
    line-height: 1.6;
    font-size: 13px;
    color: #334155;
}

.psc-tech-content p:last-child {
    margin-bottom: 0;
}

.psc-tech-content strong {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-weight: 700;
    font-size: 13px;
}

.psc-tech-content code {
    display: block;
    padding: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    word-break: break-all;
    font-family: 'Monaco', 'Courier New', monospace;
    color: #d946ef;
    font-weight: 600;
}

.psc-fingerprint {
    font-size: 10px !important;
    line-height: 1.7;
}

/* SSL Grade - Icon + Text + Badge */
.psc-grade-section summary {
    justify-content: flex-start;
}

.psc-grade-badge {
    padding: 5px 14px;
    border-radius: 18px;
    font-weight: 900;
    font-size: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    flex-shrink: 0;
    margin-left: auto;
}

.psc-grade-badge.psc-grade-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.psc-grade-badge.psc-grade-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.psc-grade-badge.psc-grade-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.psc-grade-header {
    margin-bottom: 16px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border: 2px solid #bae6fd;
}

.psc-grade-score {
    display: flex;
    align-items: center;
    gap: 15px;
}

.psc-grade-circle {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    border: 3px solid white;
}

.psc-grade-circle.psc-grade-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.psc-grade-circle.psc-grade-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.psc-grade-circle.psc-grade-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.psc-grade-letter {
    font-size: 30px;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.psc-grade-info {
    flex: 1;
}

.psc-grade-score-text {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 3px;
}

.psc-grade-desc {
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.psc-grade-details h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
}

.psc-grade-issues {
    margin: 0;
    padding-left: 22px;
    line-height: 1.7;
}

.psc-grade-issues li {
    color: #dc2626;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
}

.psc-no-issues {
    color: #059669;
    font-weight: 700;
    margin: 0;
    padding: 10px;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 8px;
    border: 2px solid #6ee7b7;
    font-size: 13px;
}

/* Certificate Chain - Compact */
.psc-chain-container {
    margin-bottom: 15px;
}

.psc-chain-item {
    position: relative;
    margin-bottom: 15px;
    display: flex;
    gap: 12px;
    padding: 13px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    border-left: 4px solid #0ea5e9;
    transition: all 0.3s;
}

.psc-chain-item:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
}

.psc-chain-item:last-child {
    margin-bottom: 0;
}

.psc-chain-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.psc-chain-content {
    flex: 1;
}

.psc-chain-type {
    font-size: 10px;
    color: #0369a1;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.psc-chain-subject {
    font-size: 14px;
    margin-bottom: 5px;
    color: #0f172a;
    font-weight: 700;
}

.psc-chain-issuer {
    font-size: 12px;
    margin-bottom: 5px;
    color: #334155;
    font-weight: 600;
}

.psc-chain-validity {
    font-size: 11px;
    color: #64748b;
}

.psc-chain-arrow {
    position: absolute;
    left: 28px;
    bottom: -19px;
    font-size: 20px;
    color: #0ea5e9;
    font-weight: bold;
}

.psc-chain-info {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
}

.psc-chain-info p {
    margin: 0 0 7px 0;
    font-size: 12px;
    line-height: 1.6;
    color: #78350f;
}

.psc-chain-info p:last-child {
    margin-bottom: 0;
}

.psc-chain-info strong {
    color: #92400e;
}

/* Error Box */
.psc-error-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #fca5a5;
    border-radius: 10px;
    color: #991b1b;
    animation: shake 0.5s;
    margin: 0 15px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.psc-error-icon {
    font-size: 24px;
}

.psc-error-text {
    font-size: 14px;
    font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .psc-checker {
        margin: 20px auto;
    }
    
    .psc-form {
        flex-direction: column;
        padding: 0 10px;
    }
    
    .psc-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .psc-result-card {
        padding: 18px;
        margin: 0 10px;
    }
    
    .psc-grade-score {
        flex-direction: column;
        text-align: center;
    }
    
    .psc-accordion-text {
        font-size: 13px;
    }
    
    .psc-accordion-icon {
        font-size: 14px;
    }
    
    .psc-grade-badge {
        font-size: 14px;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .psc-info-grid {
        grid-template-columns: 1fr;
    }
    
    .psc-title {
        font-size: 24px;
    }
    
    .psc-subtitle {
        font-size: 13px;
    }
}
