/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Main Container for the two panels */
.main-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    gap: 30px;
    flex-wrap: wrap; /* Allows panels to stack on smaller screens */
    justify-content: center;
}

/* Left Panel: Control Panel Styles */
.control-panel {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 300px;
    max-width: 450px;
}

.control-panel h2, .preview-panel h2 {
    margin-top: 0;
    color: #34495e;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.control-panel h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: #555;
}

/* Form Styles */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

input[type="text"],
input[type="date"],
input[type="color"],
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for padding and width */
}

button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}


/* Right Panel: Preview Area Styles */
.preview-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The Certificate Itself */
#certificate-preview {
    width: 800px;
    height: 600px;
    background-color: #fff;
    border: 15px solid #c9a961; /* Default gold color */
    padding: 40px;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    font-family: 'Times New Roman', serif; /* Default classic font */
    color: #333; /* Default text color */
}

/* Inner content of the certificate */
.certificate-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    border: 2px solid #e0e0e0;
    padding: 20px;
}

/* Certificate Text Styles */
.cert-title {
    font-size: 40px;
    font-weight: bold;
    margin: 0;
    color: #c9a961; /* Gold color for the title */
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cert-subtitle {
    font-size: 18px;
    margin: 10px 0;
}

.cert-recipient {
    font-size: 32px;
    font-weight: bold;
    margin: 20px 0;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.cert-text {
    font-size: 18px;
    margin: 10px 0;
}

.cert-course {
    font-size: 24px;
    font-weight: bold;
    font-style: italic;
    margin: 10px 0;
}

.cert-date-completed {
    font-size: 16px;
    margin-top: 20px;
}

.cert-signatures {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.signature-box p {
    margin: 5px 0;
    font-size: 16px;
}

.signature-box hr {
    border-top: 1px solid #333;
    width: 200px;
}