
/* Modern Register Page Styles */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --dark-blue: #34495e;
    --light-gray: #f8f9fa;
    --border-color: #e0e0e0;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
}

body {
    background-color: var(--light-gray);
    font-family: 'Poppins', sans-serif;
}

.registration-container {
    padding: 4rem 0;
}

.registration-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.registration-header {
    padding: 3rem;
    text-align: center;
}

.registration-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    text-align: center;
}

.registration-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

.registration-body {
    padding: 2rem 3rem 3rem;
}

.form-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

.form-label {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.75rem;
}

.enhanced-input, .enhanced-textarea {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.enhanced-input:focus, .enhanced-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.password-toggle {
    right: 15px;
}

.role-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.role-label {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-label:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.role-option input[type="radio"]:checked + .role-label {
    border-color: var(--primary-color);
    background-color: rgba(74, 144, 226, 0.05);
}

.role-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.role-content h6 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-blue);
}

.role-content p {
    color: #7f8c8d;
}

.tutor-section {
    background-color: #fdfdff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.subjects-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.subject-label {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.subject-label:hover {
    border-color: var(--primary-color);
}

.subject-option input[type="checkbox"]:checked + .subject-label {
    background-color: rgba(74, 144, 226, 0.1);
    border-color: var(--primary-color);
}

.enhanced-submit-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.enhanced-submit-btn:hover {
    background: #3a80d1;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 144, 226, 0.2);
}

.login-link a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Matrix formatting styles */
.matrix-container {
    display: inline-block;
    margin: 10px 0;
    vertical-align: middle;
}

.matrix {
    display: flex;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    line-height: 1.4;
}

.matrix-bracket-left,
.matrix-bracket-right {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.matrix-content {
    display: flex;
    flex-direction: column;
    padding: 5px 10px;
}

.matrix-row {
    display: flex;
    justify-content: space-between;
    min-width: 80px;
    padding: 2px 0;
    white-space: nowrap;
}

.matrix-row:not(:last-child) {
    margin-bottom: 3px;
}

/* Responsive matrix styling */
@media (max-width: 768px) {
    .matrix {
        font-size: 0.9em;
    }
    
    .matrix-bracket-left,
    .matrix-bracket-right {
        font-size: 2em;
        padding: 0 3px;
    }
    
    .matrix-content {
        padding: 3px 6px;
    }
}

/* Long Division formatting styles */
.long-division-simple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    margin: 10px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.long-division-simple .dividend,
.long-division-simple .divisor,
.long-division-simple .quotient {
    font-weight: bold;
    color: #2c3e50;
}

.long-division-simple .division-symbol,
.long-division-simple .equals {
    font-size: 1.2em;
    color: #3498db;
}

.long-division-format {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    text-align: center;
}

.long-division-format .quotient {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
    border-bottom: 2px solid #34495e;
    padding-bottom: 3px;
    display: inline-block;
    min-width: 60px;
}

.long-division-format .division-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
}

.long-division-format .divisor {
    font-weight: bold;
    color: #2c3e50;
}

.long-division-format .division-bar {
    font-size: 1.5em;
    font-weight: bold;
    color: #34495e;
}

.long-division-format .dividend {
    font-weight: bold;
    color: #2c3e50;
}

/* Responsive long division styling */
@media (max-width: 768px) {
    .long-division-simple,
    .long-division-format {
        font-size: 0.9em;
        padding: 8px;
    }
    
    .long-division-simple {
        gap: 6px;
    }
}

/* Code Block Styling */
.code-block {
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e1e5e9;
    background-color: #f8f9fa;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #2d3748;
    color: white;
    font-size: 0.9em;
}

.language-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    background-color: #4a5568;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: #2d3748;
}

.copy-btn.copied {
    background-color: #38a169;
    color: white;
}

.copy-btn.copied:hover {
    background-color: #2f855a;
}

.copy-btn.error {
    background-color: #e53e3e;
    color: white;
}

.copy-btn.error:hover {
    background-color: #c53030;
}

.copy-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    background-color: #1a202c;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.code-block code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
}

/* Inline code styling */
.inline-code {
    background-color: #f1f5f9;
    color: #e53e3e;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    border: 1px solid #e2e8f0;
}

/* Syntax highlighting colors */
.language-python .token.keyword { color: #ff7043; }
.language-python .token.string { color: #66bb6a; }
.language-python .token.comment { color: #90a4ae; }
.language-python .token.number { color: #42a5f5; }
.language-python .token.function { color: #ab47bc; }

.language-javascript .token.keyword { color: #ff7043; }
.language-javascript .token.string { color: #66bb6a; }
.language-javascript .token.comment { color: #90a4ae; }
.language-javascript .token.number { color: #42a5f5; }
.language-javascript .token.function { color: #ab47bc; }

.language-java .token.keyword { color: #ff7043; }
.language-java .token.string { color: #66bb6a; }
.language-java .token.comment { color: #90a4ae; }
.language-java .token.number { color: #42a5f5; }
.language-java .token.class-name { color: #ffa726; }

/* Responsive code styling */
@media (max-width: 768px) {
    .code-block pre {
        font-size: 12px;
        padding: 12px;
    }
    
    .code-header {
        padding: 10px 12px;
    }
    
    .copy-btn {
        padding: 4px 8px;
        font-size: 0.7em;
    }
}

/* Table Styling */
.table-container {
    margin: 20px 0;
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.markdown-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    font-size: 14px;
    line-height: 1.6;
    table-layout: fixed;
    border: 2px solid #dee2e6;
    border-radius: 8px;
}

.markdown-table thead {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.markdown-table th {
    padding: 20px 30px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    white-space: nowrap;
    width: 25%;
    background-color: #f8f9fa;
}

.markdown-table th:last-child {
    border-right: none;
}

.markdown-table td {
    padding: 20px 30px;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    vertical-align: top;
    width: 25%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.markdown-table td:last-child {
    border-right: none;
}

.markdown-table tbody tr:hover {
    background-color: #f8f9fa;
}

.markdown-table tbody tr:last-child td {
    border-bottom: none;
}

.markdown-table tr:first-child th:first-child {
    border-top-left-radius: 6px;
}

.markdown-table tr:first-child th:last-child {
    border-top-right-radius: 6px;
}

.markdown-table tr:last-child td:first-child {
    border-bottom-left-radius: 6px;
}

.markdown-table tr:last-child td:last-child {
    border-bottom-right-radius: 6px;
}

/* Alternating row colors */
.markdown-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.markdown-table tbody tr:nth-child(even):hover {
    background-color: #e9ecef;
}

/* Code in table cells */
.markdown-table .inline-code {
    background-color: #f1f3f4;
    color: #d73a49;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.85em;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* Responsive table styling */
@media (max-width: 768px) {
    .table-container {
        margin: 15px -15px;
        border-radius: 0;
    }
    
    .markdown-table {
        font-size: 12px;
    }
    
    .markdown-table th,
    .markdown-table td {
        padding: 12px 16px;
        min-width: 100px;
        max-width: 150px;
    }
    
    .markdown-table th {
        font-size: 11px;
        white-space: normal;
    }
}

/* Very small screens - stack table */
@media (max-width: 480px) {
    .markdown-table,
    .markdown-table thead,
    .markdown-table tbody,
    .markdown-table th,
    .markdown-table td,
    .markdown-table tr {
        display: block;
    }
    
    .markdown-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .markdown-table tr {
        border: 1px solid #ccc;
        margin-bottom: 10px;
        padding: 10px;
        border-radius: 8px;
        background-color: white;
    }
    
    .markdown-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50% !important;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    
    .markdown-table td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: #495057;
    }
}
