/* Modern Certificate System CSS - Matching Performance Report Style */

/* Certificate Container */
#certificate-container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 25px 25px 0px 0px;
	position: relative;
	min-height:85hv;
}

/* Loading States */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc267f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Error States */
.error-container {
    text-align: center;
    padding: 60px 20px;
}

.test-performance-error {
    text-align: center;
    padding: 40px 20px;
    border-radius: 8px;
    /*border-left: 4px solid #dc267f;*/
}

.error-icon {
    color: #dc267f;
    margin: 20px auto;
    width: 50px;
    height: 50px;
}

.error-container h3,
.test-performance-error h3 {
    color: #333;
    margin: 20px 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.error-container p,
.test-performance-error p {
    color: #666;
    margin: 0 0 20px;
    font-size: 16px;
}

/* Header */
.performance-header {
    text-align: center;
}

.performance-header h2 {
    color: #333;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 0px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.performance-header p { padding-top:-7px;}

.header-subtitle {
    color: #666;
    font-size: 18px;
    margin: 0;
    font-weight: 400;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #dc267f, #ffc107);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 127, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 127, 0.4);
}

.btn-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dashboard Header - Matching Performance Report Style */
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #dc267f 0%, #f8455a 100%);
    border-radius: 12px;
    color: white;
    box-shadow: 0 4px 15px rgba(220, 38, 127, 0.3);
}

.student-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.student-info p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Certificates Grid */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.certificates-grid.blurred {
    filter: blur(3px);
    opacity: 0.6;
    pointer-events: none;
}

/* Certificate Cards - Modern Design */
.certificate-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.certificate-card.qualified {
    border-color: #10b981;
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.certificate-card.not-qualified {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #ffffff 0%, #fefbf3 100%);
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc267f 0%, #f8455a 100%);
}

.certificate-card.qualified::before {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.certificate-card.not-qualified::before {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

/* Certificate Header */
.certificate-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.certificate-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    background: linear-gradient(135deg, #dc267f 0%, #f8455a 100%);
    color: white;
    flex-shrink: 0;
}

.certificate-card.qualified .certificate-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.certificate-card.not-qualified .certificate-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.certificate-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
    line-height: 1.3;
}

/* Certificate Body */
.certificate-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Proficiency Display */
.proficiency-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.proficiency-label {
    font-weight: 600;
    color: #374151;
    font-size: 1rem;
}

.proficiency-value {
    font-size: 1.6rem;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 25px;
    background: white;
    border: 2px solid;
}

.proficiency-value.qualified {
    color: #059669;
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.proficiency-value.not-qualified {
    color: #d97706;
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3 0%, #fef3c7 100%);
}

/* Progress Info */
.progress-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #dc267f;
}

.progress-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #555;
}

.progress-info strong {
    color: #333;
    font-weight: 600;
}

/* Certificate Status */
.certificate-status {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    gap: 10px;
}

.certificate-status.qualified {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #059669;
    border: 2px solid #10b981;
}

.certificate-status.not-qualified {
    background: linear-gradient(135deg, #fefbf3 0%, #fef3c7 100%);
    color: #d97706;
    border: 2px solid #f59e0b;
}

.status-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

/* Error States */
.error-container {
    text-align: center;
    padding: 60px 20px;
}

.test-performance-error {
    text-align: center;
    padding: 40px 20px;
}

.error-icon {
    color: #dc267f;
    margin-bottom: 20px;
}

.error-container h3,
.test-performance-error h3 {
    color: #333;
    margin: 20px 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.error-container p,
.test-performance-error p {
    color: #666;
    margin: 0 0 20px;
    font-size: 16px;
}

/* Download Button */
.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.download-btn.qualified {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.download-btn.qualified:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.download-btn.qualified:active {
    transform: translateY(0);
}

/* Requirements */
.requirements {
    padding: 20px;
    background: #fff7ed;
    border-radius: 10px;
    border-left: 4px solid #f59e0b;
}

.requirements p {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #92400e;
    font-size: 0.95rem;
}

.requirements ul {
    margin: 0;
    padding-left: 20px;
    color: #b45309;
}

.requirements li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

/* Loading Spinner - Modern Design */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #dc267f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    color: #666;
    font-size: 16px;
    margin: 0;
    font-weight: 500;
}

/* Error Messages */
.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #f87171;
    color: #dc2626;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
}

/* Login Required Overlay */
.login-required-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-required-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.login-required-content {
    position: relative;
    z-index: 1;
}

.login-required-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    margin: 20px;
}

.lock-icon {
    color: #dc267f;
    margin-bottom: 20px;
}

.login-required-modal h3 {
    color: #333;
    margin: 20px 0 15px;
    font-size: 24px;
    font-weight: 600;
}

.login-required-modal p {
    color: #666;
    margin: 0 0 30px;
    font-size: 16px;
    line-height: 1.5;
}

.login-required-btn {
    background: linear-gradient(135deg, #dc267f 0%, #f8455a 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-required-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 127, 0.4);
}

/* Error Messages */
.error {
    color: #ef4444;
    background: #fef2f2;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #ef4444;
    text-align: center;
    font-weight: 500;
}

/* Download Feedback */
#download-feedback {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 1000;
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .certificates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .certificate-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .certificate-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto;
    }
    
    .proficiency-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .performance-header h2 {
        font-size: 24px;
        flex-direction: column;
    }
    
    .header-subtitle {
        font-size: 16px;
    }
    
    .dashboard-header {
        padding: 20px 15px;
    }
    
    .student-info h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    #certificate-container {
        padding: 15px;
    }
    
    .certificate-card {
        padding: 20px;
    }
    
    .certificate-header h3 {
        font-size: 1.2rem;
    }
    
    .proficiency-value {
        font-size: 1.3rem;
        padding: 6px 15px;
    }
    
    .performance-header {
    }
    
    .performance-header h2 {
        font-size: 20px;
    }
    
    .error-container,
    .test-performance-error {
        padding: 30px 15px;
    }
    
    .error-container h3,
    .test-performance-error h3 {
        font-size: 20px;
    }
    
    .download-btn {
        padding: 15px 20px;
        font-size: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* SVG Icon Styles */
.error-icon svg,
.certificate-icon svg {
    width: 100%;
    height: 100%;
}

