/* ========== CERTIFICATE.CSS - Verification Page Styling (UPDATED v1.1) ========== */
/* Compatible dengan style.css (header/footer) */

/* ========== MAIN LAYOUT ========== */
.certificate-main {
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.certificate-container {
    max-width: 800px;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 40px;
}

/* ========== HERO SECTION ========== */
.certificate-hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero-icon {
    margin-bottom: 20px;
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-icon i {
    font-size: 4rem;
    color: #0b3952;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.certificate-hero h1 {
    color: #0b3952;
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.certificate-hero .subtitle {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ========== SEARCH SECTION ========== */
.search-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: #0b3952;
    margin-bottom: 8px;
    font-size: 1rem;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    outline: none;
    border-color: #0b3952;
    box-shadow: 0 0 0 4px rgba(11, 57, 82, 0.1);
}

.input-hint {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}

.btn-search {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #0b3952 0%, #082c42 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(11, 57, 82, 0.4);
}

.btn-search:active {
    transform: translateY(0);
}

.btn-search:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== LOADING STATE ========== */
.loading-state {
    text-align: center;
    padding: 40px 20px;
    color: #0b3952;
    animation: fadeIn 0.3s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0b3952;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.loading-state p {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ========== RESULT SECTION (SMOOTH TRANSITIONS!) ========== */
.result-section {
    margin-top: 30px;
}

.result-card {
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    /* Smooth fade & slide animation */
    animation: fadeInUp 0.5s ease-out;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Smooth fade in & slide up animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Valid Card */
.result-card.valid {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 50%, #d4edda 100%);
    border: 3px solid #28a745;
}

.result-card.valid .result-icon i {
    font-size: 5rem;
    color: #28a745;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease-out 0.2s both;
}

/* Scale in animation for icon */
@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.result-card.valid h2 {
    color: #155724;
    font-size: 2rem;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

/* Invalid Card */
.result-card.invalid {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 50%, #f8d7da 100%);
    border: 3px solid #dc3545;
}

.result-card.invalid .result-icon i {
    font-size: 5rem;
    color: #dc3545;
    margin-bottom: 20px;
    animation: shake 0.5s ease-out 0.2s both;
}

/* Shake animation for invalid */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.result-card.invalid h2 {
    color: #721c24;
    font-size: 2rem;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out 0.3s both;
}

.error-message {
    color: #721c24;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease-out 0.4s both;
}

.btn-retry {
    padding: 12px 30px;
    background: #0b3952;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out 0.5s both;
}

.btn-retry:hover {
    background: #082c42;
    transform: translateY(-2px);
}

/* ========== CERTIFICATE INFO ========== */
.cert-info {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: left;
    animation: fadeIn 0.5s ease-out 0.4s both;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    animation: slideInLeft 0.5s ease-out both;
}

/* Stagger animation for each row */
.info-row:nth-child(1) { animation-delay: 0.5s; }
.info-row:nth-child(2) { animation-delay: 0.6s; }
.info-row:nth-child(3) { animation-delay: 0.7s; }
.info-row:nth-child(4) { animation-delay: 0.8s; }
.info-row:nth-child(5) { animation-delay: 0.9s; }
.info-row:nth-child(6) { animation-delay: 1.0s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.info-label i {
    color: #0b3952;
    width: 20px;
    text-align: center;
}

.info-value {
    font-weight: 700;
    color: #0b3952;
    text-align: right;
    flex: 1;
}

.badge-status {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.badge-status.peserta {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-status.panitia {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.badge-status.pembicara {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ========== ACTIONS ========== */
.cert-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-out 1.1s both;
}

.btn-action {
    flex: 1;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view {
    background: #0b3952;
    color: #fff;
}

.btn-view:hover {
    background: #082c42;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(11, 57, 82, 0.3);
}

.btn-download {
    background: #28a745;
    color: #fff;
}

.btn-download:hover:not(.disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-download.disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-download.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ========== CERT NOTE ========== */
.cert-note {
    background: #f0f8ff;
    border: 1px solid #0b3952;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: fadeIn 0.5s ease-out 1.2s both;
}

.cert-note i {
    color: #0b3952;
    font-size: 1.3rem;
    margin-top: 2px;
}

.cert-note p {
    color: #0b3952;
    margin: 0;
    line-height: 1.6;
    text-align: left;
}

/* ========== INFO SECTION (CARA VERIFIKASI) ========== */
.info-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-top: 40px;
}

.info-section h3 {
    color: #0b3952;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center; /* CENTERED! */
}

.info-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0b3952 0%, #082c42 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    color: #0b3952;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.step-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
    .certificate-main {
        padding: 20px 10px;
    }
    
    .certificate-container {
        padding: 25px 20px;
    }
    
    .certificate-hero h1 {
        font-size: 1.8rem;
    }
    
    .certificate-hero .subtitle {
        font-size: 1rem;
    }
    
    .hero-icon i {
        font-size: 3rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .cert-actions {
        flex-direction: column;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-value {
        text-align: left;
    }
    
    /* MOBILE: Centered Steps */
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .step-content {
        text-align: center;
    }
    
    .result-card.valid h2,
    .result-card.invalid h2 {
        font-size: 1.5rem;
    }
    
    .result-card.valid .result-icon i,
    .result-card.invalid .result-icon i {
        font-size: 4rem;
    }
}

@media (max-width: 480px) {
    .certificate-hero h1 {
        font-size: 1.5rem;
    }
    
    .btn-search {
        font-size: 1rem;
        padding: 12px;
    }
    
    .input-group input {
        font-size: 1rem;
        padding: 12px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}