* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

header {
    text-align: center;
    color: white;
    padding: 15px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.controls {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.preview {
    flex: 2;
    min-width: 500px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.control-group {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #2575fc;
}

h3 {
    font-size: 1.2rem;
    margin: 10px 0;
    color: #6a11cb;
}

.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

button {
    background: #2575fc;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s;
    margin-right: 10px;
    margin-bottom: 10px;
}

button:hover {
    background: #1c64e0;
}

.btn-primary {
    background: #6a11cb;
}

.btn-primary:hover {
    background: #4e0ba5;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20px;
}

.result-card {
    width: 100%;
    max-width: 800px;
    border: 2px solid #6a11cb;
    border-radius: 10px;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #6a11cb;
}

.school-info {
    text-align: center;
    flex-grow: 1;
}

.school-logo {
    width: 100px;
    height: 100px;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #777;
    background: #f9f9f9;
}

.student-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.subject-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.subject-table th, .subject-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.subject-table th {
    background-color: #f0f0f0;
}

.remarks-section {
    margin: 20px 0;
}

.signature-section {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

.signature-box {
    text-align: center;
    width: 200px;
    border-top: 1px solid #333;
    padding-top: 5px;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    display: none;
}

.close-fullscreen {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    z-index: 1001;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .controls, .preview {
        min-width: 100%;
    }
    
    .student-info {
        grid-template-columns: 1fr;
    }
    
    .signature-section {
        flex-direction: column;
        gap: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
}