/* ===========================================
   MS TECH IT - Certificate Validation Styles
   Beautiful, Modern & Responsive Design
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --white: #ffffff;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #22c55e;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 60%);
    animation: bgPulse 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes checkmark {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ===========================================
   Validation Container
   =========================================== */
.validation-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===========================================
   Header
   =========================================== */
.validation-header {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.validation-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
    animation: pulse 8s infinite;
}

.validation-header h1 {
    font-size: 2.2em;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.validation-header h2 {
    font-size: 1.3em;
    margin-bottom: 12px;
    opacity: 0.95;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.validation-header p {
    font-size: 0.95em;
    opacity: 0.7;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ===========================================
   Validation Form
   =========================================== */
.validation-form {
    padding: 50px 40px;
    background: linear-gradient(180deg, var(--white) 0%, var(--light) 100%);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.input-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.05em;
}

.input-group input {
    padding: 18px 20px;
    border: 2px solid var(--light);
    border-radius: var(--radius);
    font-size: 1.1em;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    text-align: center;
    letter-spacing: 1px;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.input-group input::placeholder {
    color: var(--gray-light);
    letter-spacing: normal;
}

.btn-validate {
    padding: 18px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1.1em;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-validate::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-validate:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.35);
}

.btn-validate:hover::before {
    left: 100%;
}

.btn-validate:active {
    transform: translateY(-1px);
}

/* ===========================================
   Validation Result
   =========================================== */
.validation-result {
    padding: 50px 40px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.validation-result.valid {
    background: linear-gradient(180deg, #f0fdf4 0%, #dcfce7 100%);
}

.validation-result.invalid {
    background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
}

.validation-result.error {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

.result-icon {
    font-size: 5em;
    margin-bottom: 20px;
    animation: checkmark 0.6s ease-out;
    display: inline-block;
}

.validation-result h3 {
    font-size: 1.6em;
    margin-bottom: 30px;
    color: var(--dark);
    font-weight: 600;
}

/* ===========================================
   Certificate Details
   =========================================== */
.certificate-details {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 24px auto;
    text-align: left;
    max-width: 700px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row {
    display: flex;
    padding: 16px 0;
    border-bottom: 1px solid var(--light);
    animation: slideIn 0.3s ease-out;
    animation-fill-mode: both;
}

.detail-row:nth-child(1) { animation-delay: 0.1s; }
.detail-row:nth-child(2) { animation-delay: 0.15s; }
.detail-row:nth-child(3) { animation-delay: 0.2s; }
.detail-row:nth-child(4) { animation-delay: 0.25s; }
.detail-row:nth-child(5) { animation-delay: 0.3s; }
.detail-row:nth-child(6) { animation-delay: 0.35s; }

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

.detail-label {
    font-weight: 600;
    color: var(--gray);
    width: 180px;
    flex-shrink: 0;
    font-size: 0.95em;
}

.detail-value {
    color: var(--dark);
    flex: 1;
    font-weight: 500;
}

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

.detail-value.status-active::before {
    content: '✓';
    width: 20px;
    height: 20px;
    background: var(--success);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
}

.detail-value.status-revoked {
    color: var(--danger);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value.status-revoked::before {
    content: '✕';
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7em;
}

/* ===========================================
   Actions
   =========================================== */
.validation-actions {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-view {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-view:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

/* ===========================================
   Info Section
   =========================================== */
.info-section {
    padding: 40px;
    background: var(--light);
}

.info-section h3 {
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-section h3::before {
    content: '📋';
    font-size: 1.2em;
}

.info-section ol {
    margin-left: 24px;
    color: var(--gray);
    line-height: 2;
}

.info-section ol li {
    padding: 4px 0;
}

.info-section ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

/* ===========================================
   Admin Link
   =========================================== */
.admin-link {
    padding: 24px 40px;
    text-align: center;
    border-top: 1px solid var(--light);
    background: var(--white);
}

.admin-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.admin-link a::before {
    content: '🔐';
}

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

/* ===========================================
   Certificate Preview
   =========================================== */
.certificate-preview-section {
    padding: 40px;
    background: var(--light);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.certificate-preview-section h3 {
    text-align: center;
    margin-bottom: 24px;
    color: var(--dark);
    font-weight: 600;
}

.certificate-preview-container {
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: white;
}

/* ===========================================
   Responsive Design
   =========================================== */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .validation-container {
        border-radius: var(--radius);
    }
    
    .validation-header {
        padding: 40px 24px;
    }
    
    .validation-header h1 {
        font-size: 1.6em;
    }
    
    .validation-header h2 {
        font-size: 1.1em;
    }
    
    .validation-form {
        padding: 30px 24px;
    }
    
    .input-group input {
        padding: 16px;
        font-size: 1em;
    }
    
    .btn-validate {
        width: 100%;
        padding: 16px;
    }
    
    .validation-result {
        padding: 30px 24px;
    }
    
    .result-icon {
        font-size: 4em;
    }
    
    .validation-result h3 {
        font-size: 1.3em;
    }
    
    .certificate-details {
        padding: 20px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 6px;
    }
    
    .detail-label {
        width: 100%;
        font-size: 0.85em;
    }
    
    .info-section {
        padding: 30px 24px;
    }
    
    .validation-actions {
        flex-direction: column;
    }
    
    .btn-view {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .validation-header h1 {
        font-size: 1.4em;
    }
    
    .validation-header p {
        font-size: 0.85em;
    }
    
    .input-group label {
        font-size: 0.95em;
    }
    
    .certificate-details {
        padding: 16px;
    }
    
    .detail-row {
        padding: 12px 0;
    }
}

/* ===========================================
   Scrollbar Styling
   =========================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray);
}

/* ===========================================
   Selection Styling
   =========================================== */
::selection {
    background: rgba(16, 185, 129, 0.2);
    color: var(--dark);
}
