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

body {
    font-family: 'Poppins', sans-serif;
    background: #f8f9fa;
}

.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.logo-container {
    color: white;
}

.logo-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
}

.logo-icon i {
    font-size: 45px;
    color: white;
}

.academy-name {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.search-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    margin-top: 40px;
}

.search-title {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.search-subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.search-input-group {
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-input-group .input-group-text {
    background: white;
    border: none;
    padding-left: 20px;
    color: #667eea;
    font-size: 18px;
}

.search-input-group .form-control {
    border: none;
    padding: 18px 15px;
    font-size: 16px;
}

.search-input-group .form-control:focus {
    box-shadow: none;
}

.search-input-group .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 15px 35px;
    font-weight: 600;
    border-radius: 0 50px 50px 0;
    transition: all 0.3s;
}

.search-input-group .btn-primary:hover {
    transform: scale(1.05);
}

.admin-link {
    margin-top: 30px;
}

.admin-link a {
    text-decoration: none;
    transition: all 0.3s;
}

.admin-link a:hover {
    color: white !important;
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: white;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: white;
    bottom: 20%;
    left: -50px;
    animation-delay: 3s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: white;
    bottom: -50px;
    right: 30%;
    animation-delay: 6s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

.certificate {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    border: 3px solid #667eea;
}

.certificate-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%);
    padding: 40px;
    color: white;
    text-align: center;
}

.academy-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.academy-logo i {
    font-size: 40px;
}

.academy-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 15px 0 5px;
}

.academy-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.academy-address {
    font-size: 0.85rem;
    opacity: 0.7;
}

.certificate-body {
    padding: 40px;
}

.certificate-title {
    color: #1e3c72;
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    position: relative;
    display: inline-block;
}

.certificate-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.certificate-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin-top: 20px;
}

.student-info {
    margin: 40px 0;
}

.student-name {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    position: relative;
}

.student-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: #667eea;
}

.student-label {
    color: #7f8c8d;
    font-size: 0.95rem;
}

.result-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.result-details p {
    margin: 10px 0;
    font-size: 1rem;
    color: #2c3e50;
}

.result-details strong {
    color: #1e3c72;
}

.grade-badge {
    display: inline-block;
    padding: 5px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-weight: 600;
}

.certificate-footer {
    border-top: 2px solid #e0e0e0;
    padding-top: 30px;
    margin-top: 30px;
}

.footer-label {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.cert-id {
    font-family: monospace;
    font-size: 0.9rem;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    border: 5px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.qr-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-top: 8px;
}

@media print {
    .navbar, .topbar, .btn, footer, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .certificate {
        box-shadow: none;
        border: none;
    }
}

@media (max-width: 768px) {
    .academy-name {
        font-size: 2rem;
    }
    
    .search-card {
        padding: 25px;
        margin: 20px;
    }
    
    .certificate-body {
        padding: 20px;
    }
    
    .student-name {
        font-size: 1.5rem;
    }
    
    .result-details .col-md-6 {
        margin-bottom: 15px;
    }
}

#errorMessage {
    border-radius: 10px;
    font-size: 0.9rem;
}
