/* Frontend Styles */
.ecm-container {
    max-width: 600px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.ecm-search-box {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    margin-bottom: 30px;
}

.ecm-header {
    text-align: center;
    margin-bottom: 30px;
}

.ecm-header h2 {
    margin: 0 0 10px 0;
    color: #2c2d79;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ecm-header h2 i {
    color: #2d2c79;
}

.ecm-description {
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}

/* Form */
.ecm-form-group {
    margin-bottom: 25px;
}

.ecm-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ecm-form-group label i {
    color: #6b7280;
    width: 16px;
}

.ecm-form-group input[type="email"],
.ecm-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #1f2937;
    box-sizing: border-box;
}

.ecm-form-group input[type="email"]:hover,
.ecm-form-group select:hover {
    border-color: #9ca3af;
}

.ecm-form-group input[type="email"]:focus,
.ecm-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ecm-error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ecm-error:before {
    content: "⚠";
    font-size: 12px;
}

/* Submit Button */
.ecm-submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6060BF 0%, #2D2C79 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.ecm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.ecm-submit-btn:active {
    transform: translateY(0);
}

.ecm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading */
.ecm-loading {
    text-align: center;
    padding: 40px 0;
    margin: 20px 0;
}

.ecm-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: ecm-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes ecm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results */
.ecm-results {
    margin-top: 30px;
    animation: ecm-slideUp 0.3s ease;
}

@keyframes ecm-slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ecm-success-card {
    background: linear-gradient(135deg, #E1E1FF 0%, #D9D9FF 100%);
    border: 1px solid #C8C8FC;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
}

.ecm-success-card h3 {
    color: #2D2C79;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 22px;
}

.ecm-certificate-info {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: left;
}

.ecm-certificate-info p {
    margin: 10px 0;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ecm-certificate-info strong {
    color: #1f2937;
    font-weight: 600;
    min-width: 80px;
}

.ecm-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6060BF 0%, #2D2C79 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.ecm-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
}

.ecm-error-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #991b1b;
}

.ecm-error-card h3 {
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
}

/* Help Box */
.ecm-help-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #e2e8f0;
}

.ecm-help-box h3 {
    color: #1e293b;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.ecm-help-box ul {
    margin: 0;
    padding-left: 20px;
    color: #475569;
}

.ecm-help-box li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 640px) {
    .ecm-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .ecm-search-box {
        padding: 25px;
    }
    
    .ecm-header h2 {
        font-size: 24px;
    }
    
    .ecm-description {
        font-size: 14px;
    }
    
    .ecm-certificate-info p {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}