.eqg-generate-form {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.eqg-generate-form h2 {
    margin-top: 0;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.eqg-form-group {
    margin-bottom: 25px;
}

.eqg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.eqg-form-group textarea,
.eqg-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.eqg-form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.eqg-button {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.eqg-button:hover {
    background: #2980b9;
}

.eqg-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Messages */
.eqg-message {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid transparent;
}

.eqg-warning {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.eqg-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    padding: 20px;
    margin: 20px 0;
}

.eqg-error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    padding: 20px;
    margin: 20px 0;
}

.eqg-loading {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

/* Admin link */
.admin-url {
    display: none;
}

/* View Question Page Styles */
.eqg-view-question {
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.eqg-view-question h2 {
    color: #2c3e50;
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #3498db;
}

.eqg-original-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.eqg-original-section h3 {
    margin-top: 0;
    color: #495057;
}

.eqg-original-content {
    white-space: pre-wrap;
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-family: monospace;
    line-height: 1.6;
    margin-bottom: 15px;
}

.eqg-meta {
    font-size: 0.9em;
    color: #6c757d;
}

/* Variations Section */
.eqg-variations-section {
    margin-top: 30px;
}

.eqg-variations-section h3 {
    color: #495057;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #6c757d;
}

.eqg-variation {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.eqg-variation h4 {
    margin-top: 0;
    color: #343a40;
    border-bottom: 1px solid #adb5bd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.eqg-variation-content {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Solutions Section */
.eqg-solutions-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #28a745;
}

.eqg-solutions-section h3 {
    color: #155724;
    margin-bottom: 20px;
}

.eqg-solution {
    background: #e8f5e9;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.eqg-solution h4 {
    margin-top: 0;
    color: #155724;
}

.eqg-solution-content {
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    line-height: 1.6;
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid #b1dfbb;
}

/* Copy Button */
.eqg-copy-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.eqg-copy-btn:hover {
    background: #545b62;
}

/* Message boxes */
.eqg-message {
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
    border: 1px solid transparent;
}

.eqg-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.eqg-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.eqg-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
    padding: 20px;
    margin: 20px 0;
}

.eqg-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.eqg-loading {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .eqg-view-question {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .eqg-original-section,
    .eqg-variation,
    .eqg-solution {
        padding: 15px;
    }
}

/* Teacher Dashboard */
.eqg-teacher-dashboard {
    max-width: 1200px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.eqg-dashboard-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.eqg-dashboard-header h2 {
    margin-top: 0;
    color: #2c3e50;
}

.eqg-dashboard-stats {
    font-size: 1.1em;
    color: #6c757d;
    margin: 10px 0;
}

.eqg-dashboard-link {
    margin-top: 15px;
}

/* Questions List */
.eqg-questions-list {
    margin-top: 20px;
}

.eqg-question-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.eqg-question-card:hover {
    border-color: #adb5bd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.eqg-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.eqg-question-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.2em;
}

.eqg-question-date {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: normal;
    margin-left: 10px;
}

.eqg-question-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eqg-variations-badge {
    background: #e7f3ff;
    color: #0056b3;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid #b3d7ff;
}

.eqg-toggle-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.eqg-toggle-btn:hover {
    background: #545b62;
}

.eqg-question-preview {
    color: #6c757d;
    font-style: italic;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.eqg-question-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #dee2e6;
}

.eqg-dashboard-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
    font-size: 0.9em;
}

/* Password Protected Message */
.post-password-form {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.post-password-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #495057;
}

.post-password-form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.post-password-form input[type="submit"] {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.post-password-form input[type="submit"]:hover {
    background: #2980b9;
}

/* LaTeX Content Styles */
.eqg-latex-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    white-space: pre-wrap;
}

.eqg-latex-content .latex-display {
    display: block;
    text-align: center;
    margin: 1em 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    overflow-x: auto;
}

.eqg-latex-content .latex-inline {
    font-family: "Cambria Math", "Latin Modern Math", STIXGeneral, serif;
    background: #f0f8ff;
    padding: 2px 4px;
    border-radius: 3px;
    border: 1px solid #d1e7ff;
}

/* KaTeX specific styles */
.katex {
    font-size: 1.1em !important;
}

.katex-display {
    margin: 1em 0 !important;
    padding: 10px !important;
    background: #f8f9fa !important;
    border-radius: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

.katex-display > .katex {
    display: inline-block !important;
    white-space: nowrap !important;
}

/* Ensure proper spacing around LaTeX */
.eqg-original-content,
.eqg-variation-content,
.eqg-solution-content {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* Math content highlighting */
.math-container {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    border-left: 3px solid #3498db;
}

/* Responsive math */
@media (max-width: 768px) {
    .katex-display {
        font-size: 0.9em !important;
    }
    
    .eqg-latex-content {
        font-size: 14px;
    }
}

/* All Questions View Styles */
.eqg-all-questions {
    max-width: 1000px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.eqg-all-questions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #3498db;
}

.eqg-all-questions-header h2 {
    margin: 0;
    color: #2c3e50;
}

.eqg-count {
    background: #e7f3ff;
    color: #0056b3;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.eqg-questions-list {
    margin-top: 20px;
}

.eqg-question-card {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.eqg-question-card:hover {
    border-color: #adb5bd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.eqg-question-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.eqg-question-card-header h3 {
    margin: 0;
    color: #495057;
    font-size: 1.2em;
}

.eqg-question-date {
    font-size: 0.8em;
    color: #6c757d;
    font-weight: normal;
    margin-left: 10px;
}

.eqg-question-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.eqg-variations-badge {
    background: #e7f3ff;
    color: #0056b3;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid #b3d7ff;
}

.eqg-button-small {
    padding: 6px 12px;
    font-size: 0.9em;
}

.eqg-toggle-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.eqg-toggle-btn:hover {
    background: #545b62;
}

.eqg-question-preview {
    color: #6c757d;
    font-style: italic;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin-bottom: 15px;
}

.eqg-question-full {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #dee2e6;
}

.eqg-question-full h4 {
    margin-top: 0;
    color: #495057;
}

.eqg-question-content {
    white-space: pre-wrap;
    font-family: monospace;
    line-height: 1.6;
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.eqg-question-stats {
    margin-top: 15px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
}

.eqg-pagination {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

/* Navigation styles */
.eqg-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.eqg-navigation .eqg-button {
    background: #6c757d;
}

.eqg-navigation .eqg-button:hover {
    background: #545b62;
}

/* Responsive for all questions view */
@media (max-width: 768px) {
    .eqg-all-questions {
        padding: 20px;
        margin: 20px 10px;
    }
    
    .eqg-all-questions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .eqg-question-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .eqg-question-card-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Enhanced Form Styles */
.eqg-subtitle {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 30px;
}

.eqg-help-text {
    font-size: 0.9em;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.eqg-reference-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.eqg-reference-inputs {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.eqg-file-upload {
    margin-top: 20px;
}

.eqg-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #fff;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.eqg-upload-area:hover {
    border-color: #3498db;
    background: #f8faff;
}

.eqg-file-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.eqg-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.eqg-file-name {
    font-weight: 500;
}

.eqg-file-size {
    color: #666;
    font-size: 0.9em;
}

.eqg-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.eqg-remove-file:hover {
    background: #c82333;
}

.eqg-settings-section {
    background: #f0f7ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #d1e7ff;
}

.eqg-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.eqg-button-large {
    padding: 15px 40px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 30px auto;
}

.eqg-spinner {
    font-size: 0.9em;
    opacity: 0.8;
}

.eqg-action-buttons {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.eqg-button-secondary {
    background: #6c757d;
}

.eqg-button-secondary:hover {
    background: #545b62;
}

.eqg-preview {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

.eqg-preview h4 {
    margin-top: 0;
    color: #155724;
}

.eqg-preview-content {
    white-space: pre-wrap;
    font-family: monospace;
    line-height: 1.6;
    padding: 15px;
    background: white;
    border-radius: 4px;
    border: 1px solid #b1dfbb;
}

.eqg-shortcode-info {
    background: #fff3cd;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    border: 1px solid #ffeaa7;
}

.eqg-shortcode-info code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #ddd;
    font-family: monospace;
}

.eqg-variation-topic {
    font-size: 0.8em;
    background: #e7f3ff;
    color: #0056b3;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 10px;
    font-weight: normal;
}

/* Responsive */
@media (max-width: 768px) {
    .eqg-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .eqg-action-buttons {
        flex-direction: column;
    }
    
    .eqg-button-large {
        width: 100%;
        padding: 15px 20px;
    }
}





