/* PolySnek Main Styles */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.5;
    background-color: #f1f5f9;
    color: #0f172a;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    color: inherit;
    text-decoration: inherit;
}

hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 10px 0;
}

/* Layout utilities */
.layout {
    height: 100dvh;
    display: flex;
    flex-direction: column;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-auto {
    flex: 1 1 auto;
}

.flex-none {
    flex: none;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hidden {
    display: none;
}

/* Alignment */
.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

/* Spacing */
.p-4 {
    padding: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.ml-auto {
    margin-left: auto;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

/* Typography */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-bold {
    font-weight: 700;
}

/* Colors */
.text-green-500 {
    color: #22c55e;
}

.text-red-500 {
    color: #ef4444;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

/* Borders */
.border-2 {
    border-width: 2px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.border-primary-300 {
    border-color: #cbd5e1;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* Background */
.bg-white {
    background-color: #ffffff;
}

/* Sizing */
.w-full {
    width: 100%;
}

.min-w-40 {
    min-width: 10rem;
}

/* Transitions and interactions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.cursor-pointer {
    cursor: pointer;
}

/* Focus states */
input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #bfdbfe;
}

/* Component-specific styles */
.header {
    border-bottom: 1px solid #cbd5e1;
    padding: 1rem;
    display: flex;
    flex: none;
}

.site-title {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: inherit;
    text-decoration: none;
}

.auth-section {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-left: auto;
}

.auth-section a {
    color: inherit;
    text-decoration: none;
}

.auth-section a:hover {
    text-decoration: underline;
}

.tagline {
    font-size: 1.5rem;
    line-height: 2rem;
}

.spacer {
    flex: 1 1 auto;
}

.main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.footer {
    /* Empty for now */
}

button {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    color: inherit;
    background-color: initial;
    background-image: none;
    border: 0 solid #e5e7eb;
    cursor: pointer;
}

/* Input styling */
.text-input {
    font-size: 2.25rem;
    padding: 0.5rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 0.5rem;
    text-align: center;
    min-width: 10rem;
    background-color: #ffffff;
    transition: all 200ms;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.text-input:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 2px #bfdbfe;
}

/* Review area */
.review-area {
    font-size: 2.25rem;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.question-area {
    text-align: center;
}

.question-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hints-container {
    font-size: 0.875rem;
    color: #4b5563;
    text-align: center;
}

.hints-container p {
    margin: 0.25rem 0;
}

.hints-container br {
    line-height: 1;
}

.hints-container hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 10px 0;
}

/* Assessment section */
.assessment-section {
    display: block;
}

.assessment-section.hidden {
    display: none;
}

/* Feedback styling */
.feedback-correct {
    color: #22c55e;
}

.feedback-incorrect {
    color: #ef4444;
}

/* Stats page */
.stats-container {
    margin-bottom: 2rem;
}

.stats-title {
    font-size: 1.5rem;
    line-height: 2rem;
    margin-bottom: 1rem;
}

.chart-section {
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.25rem;
    line-height: 1.75rem;
    margin-bottom: 0.5rem;
}

.data-summary {
    font-size: 1.125rem;
    line-height: 1.75rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.error-message {
    color: #6b7280;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stats-card {
    text-align: center;
}

.stats-number {
    font-size: 1.875rem;
    font-weight: 700;
}

.stats-label {
    color: #4b5563;
}

/* Table styling */
.stats-table {
    width: 100%;
}

.table-row {
    border-bottom: 1px solid #e5e7eb;
}

.table-header {
    text-align: left;
    padding: 0.5rem 0;
}

.table-cell {
    padding: 0.25rem 0;
}

/* Navigation lists */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: 2.25rem;
}

.nav-list li {
    margin: 1rem 0;
}

.nav-list a {
    color: inherit;
    text-decoration: none;
}

.nav-list a:hover {
    text-decoration: underline;
}