/* Modern Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --accent: #6366f1;
    --accent-glow: #818cf8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Background Effect */
.background-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, #1e1b4b 0%, #0f172a 50%);
    z-index: -1;
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.accent {
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Cards & Glassmorphism */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
}

.glass {
    padding: 2rem;
}

/* Input Section */
.input-section textarea {
    width: 100%;
    height: 200px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 1rem;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
}

.input-section textarea:focus {
    border-color: var(--accent);
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

#wordCount {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Results Section */
.hidden {
    display: none;
    opacity: 0;
}

.results-container {
    animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; display: block; }
}

/* Verdict Banner */
.verdict-banner {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 12px;
}

.score-circle {
    width: 100px;
    height: 100px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #334155;
    stroke-width: 2.5;
}

.circle {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: progress 1s ease-out forwards;
    transition: stroke 0.5s;
}

@keyframes progress {
    0% { stroke-dasharray: 0, 100; }
}

.percentage {
    fill: var(--text-primary);
    font-family: sans-serif;
    font-weight: bold;
    font-size: 0.5em; /* Scaled relative to SVG viewBox */
    text-anchor: middle;
}

.label {
    position: absolute;
    bottom: -25px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.verdict-text h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

/* Grid */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.mini-card {
    text-align: center;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mini-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.value-box {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* List */
.details-list {
    list-style: none;
}

.details-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.details-list li:last-child {
    border-bottom: none;
}

.details-list li::before {
    content: "•";
    color: var(--accent);
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: #475569;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .verdict-banner { flex-direction: column; text-align: center; gap: 1rem; }
}
