:root {
    --primary-color: #4a6bff;
    --secondary-color: #f8f9fa;
    --success-color: #28a745;
    --text-color: #333;
    --light-text: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --certificate-color: #f9f4e8;
    --gold-color: #d4af37;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7ff;
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
}

.logo {
    height: 60px;
    margin-bottom: 10px;
}

h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.content {
    padding: 30px;
}

.search-section {
    margin-bottom: 30px;
}

.search-options {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.search-option {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.search-option.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #3a5bef;
}

.result-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.verification-success {
    background: #e8f5e9;
    border-left: 4px solid var(--success-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.success-text {
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success-text svg {
    width: 20px;
    height: 20px;
    fill: var(--success-color);
}

.certificate-details {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.detail-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    width: 160px;
    color: var(--light-text);
}

.detail-value {
    flex: 1;
}

.error-message {
    color: #dc3545;
    margin-top: 10px;
    display: none;
}

.download-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.download-btn:hover {
    background: #3a5bef;
    transform: translateY(-2px);
}

/* Certificate Template Styles */
.certificate-template {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.certificate-border {
    background: var(--certificate-color);
    border: 15px solid var(--gold-color);
    padding: 40px;
    max-width: 800px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.certificate-header {
    text-align: center;
    margin-bottom: 30px;
}

.cert-logo {
    height: 80px;
    margin-bottom: 20px;
}

.certificate-header h2 {
    font-size: 28px;
    color: #222;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.certificate-subtitle {
    font-size: 18px;
    color: #555;
}

.certificate-body {
    text-align: center;
    margin: 40px 0;
}

.certificate-body h1 {
    font-size: 36px;
    color: #222;
    margin-bottom: 20px;
    font-weight: 600;
}

.certificate-text {
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}

.program-name {
    font-weight: 600;
    font-style: italic;
    color: #333;
    margin: 10px 0;
}

.certificate-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 50px;
}

.signature-block {
    text-align: center;
}

.signature-line {
    width: 200px;
    height: 1px;
    background: #333;
    margin: 0 auto 5px;
}

.signature-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.signature-title {
    font-size: 14px;
    color: #666;
}

.certificate-number {
    font-size: 14px;
    color: #666;
}

.close-certificate {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: var(--light-text);
    font-size: 14px;
}

@media (max-width: 600px) {
    .search-options {
        flex-direction: column;
        border-bottom: none;
    }
    
    .search-option {
        border-bottom: 1px solid #eee;
        padding: 8px 15px;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }

    .certificate-border {
        padding: 20px;
    }

    .certificate-body h1 {
        font-size: 28px;
    }

    .certificate-text {
        font-size: 16px;
    }
}