/* Sprinix Typing Test - Premium UI Design */
:root {
    /* Color Palette - Modern Indigo & Violet */
    --wptt-primary: hsl(243, 75%, 59%);
    --wptt-primary-soft: hsl(243, 75%, 96%);
    --wptt-accent: hsl(14, 100%, 55%);
    --wptt-accent-soft: hsl(14, 100%, 96%);
    --wptt-bg: #ffffff;
    --wptt-surface: hsl(220, 33%, 98%);
    --wptt-border: hsl(220, 20%, 92%);
    --wptt-text: hsl(220, 45%, 15%);
    --wptt-text-muted: hsl(220, 15%, 45%);
    --wptt-success: hsl(142, 69%, 45%);
    --wptt-error: hsl(0, 84%, 60%);

    /* Effects & Shadows */
    --wptt-shadow-sm: 0 2px 8px rgba(11, 35, 77, 0.04);
    --wptt-shadow-md: 0 8px 24px rgba(11, 35, 77, 0.08);
    --wptt-shadow-lg: 0 16px 48px rgba(11, 35, 77, 0.12);
    --wptt-radius: 16px;
    --wptt-radius-lg: 24px;
    --wptt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wptt-wrap {
    width: 1100px !important;
    max-width: 98% !important;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    color: var(--wptt-text);
    line-height: 1.5;
}

/* Animations */
@keyframes wpttFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wptt-fade-up {
    animation: wpttFadeUp 0.6s var(--wptt-transition);
}

/* Panel Design */
.wptt-panel {
    background: var(--wptt-bg);
    border: 1px solid var(--wptt-border);
    border-radius: var(--wptt-radius);
    padding: 32px;
    box-shadow: var(--wptt-shadow-md);
    transition: var(--wptt-transition);
}

.wptt-panel:hover {
    box-shadow: var(--wptt-shadow-lg);
}

.wptt-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 24px;
    color: var(--wptt-primary);
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Form Styles */
.wptt-form .form-row {
    margin-bottom: 20px;
}

.wptt-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wptt-text-muted);
    margin-bottom: 8px;
}

.wptt-input,
.wptt-select {
    width: 96%;
    padding: 12px 16px;
    border: 2px solid var(--wptt-border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    background: var(--wptt-surface);
    transition: var(--wptt-transition);
    color: var(--wptt-text);
}

.wptt-input:focus,
.wptt-select:focus {
    border-color: var(--wptt-primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--wptt-primary-soft);
}

/* Custom Selection Link */
.wptt-link-action {
    color: var(--wptt-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wptt-link-action:hover {
    text-decoration: underline;
}

/* Buttons */
.wptt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: var(--wptt-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--wptt-transition);
    box-shadow: 0 4px 12px hsla(243, 75%, 59%, 0.3);
}

.wptt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px hsla(243, 75%, 59%, 0.4);
}

.wptt-btn:active {
    transform: translateY(0);
}

.wptt-btn.accent {
    background: var(--wptt-accent);
    box-shadow: 0 4px 12px hsla(14, 100%, 55%, 0.3);
}

.wptt-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Radio Choice Styling */
.wptt-choices {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.wptt-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border: 2px solid var(--wptt-border);
    border-radius: 10px;
    transition: var(--wptt-transition);
}

.wptt-choice:hover {
    border-color: var(--wptt-primary);
    background: var(--wptt-primary-soft);
}

.wptt-choice input[type="radio"] {
    margin: 0;
}

/* Typing Interface Area */
.wptt-typing-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wptt-paragraph-view {
    background: var(--wptt-surface);
    border: 1px solid var(--wptt-border);
    border-radius: var(--wptt-radius);
    padding: 20px;
    font-size: 18px;
    line-height: 1.8;
    color: var(--wptt-text);
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    position: relative;
    user-select: none;
}

#typingInput {
    width: 95.5%;
    min-height: 150px;
    padding: 20px;
    border-radius: var(--wptt-radius);
    border: 2px solid var(--wptt-border);
    font-size: 18px;
    line-height: 1.6;
    background: white;
    box-shadow: var(--wptt-shadow-sm);
    resize: none;
}

#typingInput:focus {
    border-color: var(--wptt-primary);
    box-shadow: var(--wptt-shadow-lg);
}

/* Stats Bar */
.wptt-stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wptt-primary);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    font-weight: 700;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-size: 20px;
    color: var(--wptt-accent);
}

/* Result Panel - Statistical Summary */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.result-card {
    background: var(--wptt-surface);
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--wptt-border);
}

.result-card .value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--wptt-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.result-card .label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--wptt-text-muted);
}

/* Rule Cards */
.wptt-rules {
    margin-top: 32px;
}

.wptt-rule-card {
    background: white;
    border: 1px solid var(--wptt-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 6px solid var(--wptt-primary);
}

.wptt-rule-card strong {
    font-size: 18px;
    display: block;
    margin-bottom: 8px;
    color: var(--wptt-primary);
}

/* Highlight Colors */
.highlight-correct {
    color: var(--wptt-success);
}

.highlight-wrong {
    color: var(--wptt-error);
    background: hsla(0, 84%, 60%, 0.1);
}

.highlight-current {
    text-decoration: underline;
    font-weight: 700;
    color: var(--wptt-primary);
}

@media (max-width: 640px) {
    .wptt-panel {
        padding: 20px;
    }

    .wptt-title {
        font-size: 20px;
    }

    .result-grid {
        grid-template-columns: 1fr 1fr;
    }

    .wptt-stats-bar {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}