/* Certificate Form Styles */
* {
    box-sizing: border-box;
}

.certificate-form-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.certificate-form {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
}

.certificate-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #3498db, #2980b9, #1abc9c);
}

.form-header {
    text-align: center;
    padding: 40px 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.form-header h2 {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-header p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

#certificate-form {
    padding: 40px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #e74c3c;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-2px);
}

.form-group input.error,
.form-group select.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group input::placeholder {
    color: #95a5a6;
}

.rating-container {
    margin: 10px 0;
}

/* STARS ONLY RATING - No radio button styling */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center !important;
    gap: 5px;
    margin-bottom: 10px;
}

.star-rating input[type="radio"] {
    display: none !important;
    visibility: hidden;
    position: absolute;
    left: -9999px;
}

.star-rating .star {
    font-size: 35px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 5px;
    user-select: none;
    margin: 0;
    text-transform: none;
    font-weight: normal;
    letter-spacing: 0;
    display: inline-block;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star,
.star-rating input[type="radio"]:checked ~ .star {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    transform: scale(1.1);
}

.star-rating .star:hover {
    transform: scale(1.2);
}

.rating-text {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
    margin-left: 10px;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(52, 152, 219, 0.3);
}

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

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.download-section {
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.download-success {
    max-width: 400px;
    margin: 0 auto;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
    animation: bounce 0.6s ease;
}

.download-success h3 {
    color: #2c3e50;
    font-size: 24px;
    margin: 0 0 10px;
}

.download-success p {
    color: #6c757d;
    margin: 0 0 30px;
}

.download-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.download-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.pdf-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.image-btn {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
    color: white;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.download-btn span {
    margin-right: 8px;
    font-size: 18px;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Focus states and animations */
.form-group.focused input,
.form-group.focused select {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.star-rating input[type="radio"]:focus + .star {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .certificate-form-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .form-header {
        padding: 30px 20px 15px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    #certificate-form {
        padding: 30px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .star-rating {
        justify-content: center;
    }

    .star-rating .star {
        font-size: 30px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .download-btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Success and error messages for downloads */
.download-success-message,
.download-error-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    font-weight: 500;
    color: white;
}

.download-success-message {
    background: #27ae60;
}

.download-error-message {
    background: #e74c3c;
}