/* Base styles */
:root {
    --editor-bg: #f8fafc;
    --editor-border: #e2e8f0;
    --nav-height: 60px;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.top-nav {
    height: var(--nav-height);
    background-color: white;
    border-bottom: 1px solid var(--editor-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-brand {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: #64748b;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: var(--editor-bg);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--editor-bg);
}

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 2rem;
    padding: 2rem;
    margin-top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
}

/* Left Panel Styles */
.left-panel {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    height: 100%;
    position: relative;
}

.panel-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Right Panel Styles */
.right-panel {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.editor-container {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--editor-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Gradescope-specific styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
}

/* Button Styles */
.blue-gradient-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), #4f46e5);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.blue-gradient-button:hover {
    opacity: 0.9;
}

.blue-gradient-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

/* Editor Header */
.editor-header {
    padding: 1rem;
    border-bottom: 2px solid var(--editor-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--editor-bg);
}

.editor-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-button {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    border-radius: 6px;
}

.icon-button:hover {
    background-color: #f1f5f9;
}

/* Loading Styles */
.loading-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    z-index: 1000;
}

/* Tips Section */
.tips-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--editor-border);
}

.tips-section h3 {
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.tips-section ul {
    padding-left: 1.5rem;
    color: #64748b;
}

.tips-section li {
    margin-bottom: 0.5rem;
}

/* Grading results formatting */
.editor {
    padding: 2rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    font-size: 0.95rem;
    white-space: pre-wrap;
    background-color: var(--editor-bg);
}

.editor .grade {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.editor .summary {
    margin-bottom: 1.5rem;
    color: #1e293b;
}

.editor .rubric {
    margin-bottom: 1.5rem;
}

.editor .rubric-item {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.editor .explanation {
    color: #2563eb;
    margin-bottom: 1.5rem;
}

.editor .suggestions {
    color: #059669;
    margin-bottom: 1.5rem;
}

.editor .suggestion-item {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .left-panel, .right-panel {
        height: 500px;
    }
    
    .top-nav {
        padding: 0 1rem;
    }
} 