* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: #fafafa;
    color: #333;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

h1 {
    margin: 0;
    font-size: 1.5rem;
}

h2 {
    font-size: 1.2rem;
    margin-top: 0;
}

#user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

#login-form {
    display: flex;
    gap: 8px;
}

input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    resize: vertical;
}

.btn {
    padding: 8px 16px;
    background: #5850ec;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background: #4338ca;
}

.btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-small {
    padding: 4px 8px;
    background: transparent;
    color: #666;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.btn-small:hover {
    background: #eee;
}

section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.scoreboard-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 14px;
}

.tab-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.tab-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}

.tab-btn.active {
    background: white;
    border-bottom-color: white;
    font-weight: bold;
}

.tab-btn:hover:not(.active) {
    background: #eee;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: 600;
    color: #666;
    font-size: 13px;
}

.user-cell img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 8px;
}

.user-cell a {
    color: #333;
    text-decoration: none;
    vertical-align: middle;
}

.user-cell a:hover {
    text-decoration: underline;
}

.submit-notes {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.submit-notes code {
    background: #eee;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

#pyodide-status {
    padding: 10px;
    background: #fef3c7;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

#pyodide-status.ready {
    background: #d1fae5;
}

#pyodide-status.error {
    background: #fee2e2;
}

#submit-result {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}

#submit-result.success {
    background: #d1fae5;
}

#submit-result.error {
    background: #fee2e2;
}

#submit-result:empty {
    display: none;
}

.status-passed {
    color: #059669;
}

.status-failed {
    color: #dc2626;
}

footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    text-align: center;
    color: #666;
    font-size: 13px;
}

footer a {
    color: #5850ec;
}
