/* Body */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.header-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ffd700;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

/* Upload Section */
.upload-section {
    padding: 40px;
    text-align: center;
}

.upload-area {
    border: 3px dashed #e0e6ed;
    border-radius: 15px;
    padding: 60px 40px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: #fafbfc;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: #f0f3ff;
    transform: translateY(-2px);
}

.upload-content {
    max-width: 400px;
    margin: 0 auto;
}

.upload-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 20px;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #2d3748;
}

.upload-area p {
    color: #718096;
    margin-bottom: 30px;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.file-info {
    background: #e6fffa;
    border: 1px solid #38b2ac;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.file-info i {
    font-size: 2rem;
    color: #e53e3e;
}

.file-name {
    font-weight: 600;
    color: #2d3748;
}

.file-size {
    color: #718096;
    font-size: 0.9rem;
}

.action-buttons {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(72, 187, 120, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

/* Results Section */
.results-section {
    padding: 40px;
    border: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.results-header h2 {
    font-size: 2rem;
    color: #2d3748;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.invalid {
    background: #fed7d7;
    color: #742a2a;
}

.status-badge i {
    font-size: 1.2rem;
}

/* Results Navigation Tabs */
.results-navbar {
    display: flex;
    background: #f7fafc;
    border-radius: 15px;
    padding: 8px;
    margin-bottom: 30px;
    gap: 8px;
}

.nav-tab {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #4a5568;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-tab:hover {
    background: #e2e8f0;
    color: #2d3748;
}

.nav-tab.active {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-tab i {
    font-size: 1rem;
}

/* Tab Content */
.tab-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-content {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.summary-card {
    background: #f7fafc;
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid #48bb78;
}

.summary-card h3 {
    margin-bottom: 20px;
    color: #2d3748;
    font-size: 1.3rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-item .label {
    font-weight: 600;
    color: #4a5568;
}

.summary-item .value {
    color: #2d3748;
}

/* Signature Card Styles */
.signature-card {
    background: white;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    margin-top: 10px;
    /* overflow: hidden; */
    transition: all 0.3s ease;
}

.signature-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.signature-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background: #fafbfc;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.signature-header:hover {
    background: #f0f3ff;
}

.signature-title-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.signature-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
}

.signature-signer {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.signature-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.signature-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.signature-status.valid {
    background: #c6f6d5;
    color: #22543d;
}

.signature-status.invalid {
    background: #fed7d7;
    color: #742a2a;
}

.signature-toggle {
    font-size: 1rem;
    color: #667eea;
    transition: transform 0.3s ease;
}

.signature-details {
    overflow: hidden;
    transition: all 0.4s ease;
}

.signature-details.expanded {
    max-height: 2000px;
    padding: 25px;
}

.signature-details.collapsed {
    max-height: 0;
    padding: 0 25px;
}

.signature-details .detail-group {
    background: #f7fafc;
    border-radius: 10px;
    /* padding: 15px;
    margin-bottom: 15px; */
}

.signature-details .detail-group:last-child {
    margin-bottom: 0;
}

.detail-group h4 {
    margin-bottom: 10px;
    color: #4a5568;
    font-size: 1rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    /* margin-bottom: 8px; */
    font-size: 0.9rem;
    padding: 8px;
}

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

.detail-item .label {
    font-weight: 500;
    color: #718096;
}

.detail-item .value {
    color: #2d3748;
    text-align: right;
    max-width: 60%;
    word-break: break-word;
}

.certificate-list {
    margin-top: 15px;
}

.certificate-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

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

/* PDF Viewer Styles */
.pdf-viewer-container {
    background: #f7fafc;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.pdf-viewer {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 10px;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    max-width: 300px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content h3 {
    margin-bottom: 10px;
    color: #2d3748;
}

.loading-content p {
    color: #718096;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header-icon {
        font-size: 2.5rem;
    }
    
    .upload-section {
        padding: 20px;
    }
    
    .upload-area {
        padding: 40px 20px;
    }
    
    .upload-icon {
        font-size: 3rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .results-section {
        padding: 20px;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-header h2 {
        font-size: 1.5rem;
    }
    
    .results-navbar {
        flex-direction: column;
        gap: 5px;
    }
    
    .nav-tab {
        width: 100%;
    }
    
    .signature-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .signature-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .summary-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .detail-item .value {
        max-width: 100%;
        text-align: left;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .pdf-viewer {
        height: 400px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-area h3 {
        font-size: 1.3rem;
    }
    
    .file-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .nav-tab {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    .signature-header {
        padding: 15px 20px;
    }
    
    .signature-details.expanded {
        padding: 20px;
    }
    
    .pdf-viewer {
        height: 300px;
    }
}