/* Promptly Grader Styles */

.grade-page {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 60px;
}

.grade-hero {
    text-align: center;
    margin-bottom: 40px;
}

.grade-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 12px;
}

.grade-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.grade-container {
    max-width: 720px;
    margin: 0 auto;
}

/* Cards */
.grade-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

/* Textarea */
.grade-textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 140px;
    outline: none;
}

.grade-textarea::placeholder {
    color: var(--text-muted);
}

.grade-input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.char-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.char-count.over-limit {
    color: #ef4444;
}

.grade-btn {
    padding: 12px 28px;
    font-size: 0.95rem;
}

/* Loading */
.grade-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 200px;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Score Badge */
.score-section {
    text-align: center;
    margin-bottom: 24px;
}

.score-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 20px 36px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.score-number {
    font-family: 'Syne', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
}

.score-label {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.score-low {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.score-low .score-label { color: rgba(239, 68, 68, 0.5); }

.score-mid {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
}

.score-mid .score-label { color: rgba(234, 179, 8, 0.5); }

.score-high {
    background: rgba(16, 163, 127, 0.12);
    color: var(--primary);
}

.score-high .score-label { color: rgba(16, 163, 127, 0.5); }

.score-verdict {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Dimensions */
.dimensions-card h3,
.optimized-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.dimension-row {
    margin-bottom: 16px;
}

.dimension-row:last-child {
    margin-bottom: 0;
}

.dimension-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.dimension-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.dimension-label {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dim-clear, .dim-explicit, .dim-specific, .dim-thorough {
    background: rgba(16, 163, 127, 0.15);
    color: var(--primary);
}

.dim-partial, .dim-implicit, .dim-some {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.dim-vague, .dim-missing, .dim-minimal {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.dimension-bar-track {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.dimension-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.dimension-tip {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Optimized Prompt */
.optimized-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.optimized-header h3 {
    margin-bottom: 0;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.optimized-prompt {
    margin-top: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: 'DM Sans', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
}

/* Actions */
.grade-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 32px;
}

.grade-actions .btn {
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* CTA */
.grade-cta {
    text-align: center;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 20px;
}

.grade-cta p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.grade-cta .btn {
    padding: 14px 28px;
}

/* Error */
.grade-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    color: #ef4444;
}

/* Footer */
.grade-footer {
    text-align: center;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.grade-footer a {
    color: var(--primary);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 640px) {
    .grade-page {
        padding-top: 80px;
    }

    .grade-card {
        padding: 16px;
    }

    .grade-actions {
        flex-direction: column;
    }

    .grade-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .score-number {
        font-size: 2.5rem;
    }

    .score-badge {
        padding: 16px 28px;
    }
}
