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

:root {
    --primary-color: #2D3E50;
    --secondary-color: #3498DB;
    --accent-color: #FF6B35;
    --success-color: #27AE60;
    --error-color: #E74C3C;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    text-align: center;
    padding: 40px 20px;
    color: white;
}

.logo h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Main Content */
main {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 50px;
    margin: 30px auto;
    box-shadow: var(--shadow-lg);
    max-width: 900px;
}

.verify-section {
    text-align: center;
    margin-bottom: 40px;
}

.verify-section h2 {
    font-size: 2.2rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Search Box */
.search-box {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
    background: var(--bg-light);
    border-radius: 50px;
    box-shadow: var(--shadow);
}

#credentialId {
    flex: 1;
    padding: 18px 25px;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: white;
}

#credentialId:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.verify-btn {
    padding: 18px 40px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verify-btn:hover {
    background: #E85A2B;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.verify-btn:active {
    transform: translateY(0);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    margin: 30px auto;
    border: 5px solid var(--bg-light);
    border-top: 5px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner.active {
    display: block;
}

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

/* Error Message */
.error-message {
    color: var(--error-color);
    font-weight: 500;
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    background: rgba(231, 76, 60, 0.1);
    display: none;
}

.error-message.active {
    display: block;
}

/* Certificate Display */
.certificate-display {
    display: none;
    animation: fadeIn 0.5s ease;
}

.certificate-display.active {
    display: block;
}

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

.certificate-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.certificate-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.certificate-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.certificate-header h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.certificate-type {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
}

.recipient-name {
    font-size: 2rem;
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.certificate-details {
    background: white;
    color: var(--text-dark);
    border-radius: 15px;
    padding: 30px;
    margin-top: 30px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.detail-value {
    font-weight: 500;
    color: var(--text-dark);
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--success-color);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

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

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: var(--border-color);
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: white;
}

footer p {
    margin: 5px 0;
    opacity: 0.9;
}

.admin-link a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 20px;
    border: 2px solid white;
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.admin-link a:hover {
    background: white;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 30px 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .verify-section h2 {
        font-size: 1.6rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 15px;
    }

    #credentialId,
    .verify-btn {
        border-radius: 10px;
    }

    .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .detail-value {
        text-align: left;
    }

    .action-buttons {
        flex-direction: column;
    }

    .certificate-header h3 {
        font-size: 1.8rem;
    }

    .recipient-name {
        font-size: 1.5rem;
    }
}
