:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background: #f8fafc;
    --white: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

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

.title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 400;
    margin: 0;
}

/* Main Content */
.main-content {
    flex: 1;
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Search Container */
.search-container {
    text-align: center;
    padding: 60px 20px;
}

.search-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.search-container h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.search-description {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
}

.search-form {
    max-width: 500px;
    margin: 0 auto 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: var(--shadow-sm);
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.search-button:active {
    transform: translateY(0);
}

.search-hint {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px 20px;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.error-message h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.error-message p {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 10px;
}

.error-detail {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-color);
    background: var(--white);
    border: 1.5px solid var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
}

.back-button:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Certificate Container */
.certificate-container {
    animation: fadeIn 0.5s ease-in;
}

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

.certificate-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
}

.status-badge.valid {
    background: #d1fae5;
    color: #065f46;
}

.status-icon {
    font-size: 20px;
    font-weight: bold;
}

/* Info Sections */
.info-section {
    margin-bottom: 35px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-item label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 10px 15px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Actions Section */
.actions-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow-sm);
}

.action-button.primary {
    background: var(--primary-color);
    color: var(--white);
}

.action-button.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-button.secondary {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.action-button.secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.button-icon {
    font-size: 24px;
}

.button-text {
    flex: 1;
    text-align: left;
}

.button-arrow {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.action-button:hover .button-arrow {
    transform: translateX(5px);
}

/* Certificate Footer */
.certificate-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.footer-date {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--white);
    font-size: 14px;
}

.footer p {
    margin: 5px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .title {
        font-size: 24px;
    }

    .main-content {
        padding: 30px 20px;
    }

    .search-container {
        padding: 40px 15px;
    }

    .search-container h2 {
        font-size: 24px;
    }

    .search-form {
        max-width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .buttons-grid {
        grid-template-columns: 1fr;
    }

    .action-button {
        flex-direction: column;
        text-align: center;
    }

    .button-text {
        text-align: center;
    }

    .back-button {
        font-size: 13px;
        padding: 8px 16px;
    }
}