/* Styles for Social typing page */
body .social-container {
    --accent: #2ecc71; /* green */
    --accent-2: #8e44ad; /* purple */
    --orange: #ffb55a;
    --bg: #f7f9fb;
    --panel-bg: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    font-family: Inter, 'JetBrains Mono', Consolas, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
}

.social-header {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.social-main {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.social-main .center {
    flex: 1 1 0;
}

.social-main .side {
    width: 320px;
}

.typing-box {
    border: 3px solid #d0d0d0;
    border-radius: 12px;
    padding: 1rem;
    background: var(--panel-bg);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* New upper preview large box */
.social-user-preview {
 min-height: 140px;
 font-family: 'JetBrains Mono', Consolas, monospace;
 font-size: 2.2rem; /* large */
 line-height: 1.15;
 padding: 1rem;
 border-radius: 14px;
 background: #fff;
 box-shadow: 02px 4px rgba(0, 0, 0, 0.06);
 word-break: break-word;
 white-space: pre-wrap;
 border: 2px solid #eee;
}
/* Label above preview */
.social-typing-label {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: .25rem;
}

.social-typing-box {
    background: var(--panel-bg);
    border: 3px solid #d0d0d0;
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.two-line-container {
    --cell-width: 1ch;
    border: 2px solid #ccc;
    padding: 15px;
    border-radius: 12px;
    background-color: #fff;
    cursor: text;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 15px;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.two-line-container:focus {
    border-color: #8ab4f8;
    box-shadow: 0 0 5px rgba(138, 180, 248, 0.6);
}

.line-top {
    font-size: 28px;
    font-weight: bold;
    height: 34px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
}
.line-top::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}


.line-bottom {
    font-size: 18px;
    color: #777;
    height: 24px;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
}

.line-bottom::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.char {
    display: inline-block;
    text-align: center;
    width: var(--cell-width);
    min-width: 16px; /* fallback */
    height: 1.2em;
    vertical-align: middle;
}

.char.ref {
    color: #6c757d;
}

.char.correct {
    color: #28a745;
}

.char.error {
    color: #dc3545;
    background-color: #f8d7da;
    border-radius: 3px;
}

.char.pending {
    color: #e0e0e0;
}

.char.cursor::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 1.1em;
    background-color: #007bff;
    animation: blink 1s step-end infinite;
    margin-left: -1px; /* Center the cursor */
}

@keyframes blink {
    from, to { background-color: transparent }
    50% { background-color: #007bff; }
}


.social-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.btn-primary-big, .btn-secondary-big {
    padding: 0.85rem 1.4rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: .5px;
}

.btn-primary-big {
    background: #2ecc71;
    color: #fff;
}

.btn-primary-big:hover {
    background: #29b866;
}

.btn-secondary-big {
    background: #8e44ad;
    color: #fff;
}

.btn-secondary-big:hover {
    background: #7d3aa0;
}

.social-timer {
    margin-left: auto;
    font-weight: 600;
}

.progress-panel {
    border: 2px dashed #ddd;
    padding: 0.75rem;
    border-radius: 8px;
    background: linear-gradient(180deg, #fff, #fafafa);
}

.stats-item {
    margin-bottom: 0.5rem;
}

/* Character-level highlighting (legacy) */
.correct {
    color: #00aa00;
    font-weight: bold;
}

.error {
    color: #ff3333;
    font-weight: bold;
}

.pending {
    color: #888;
}

/* Responsive */
@media (max-width: 900px) {
    .social-main {
        flex-direction: column;
    }

    .social-main .side {
        width: 100%;
    }

    .social-timer {
        width: 100%;
        text-align: right;
    }
}
