#main-wrapper {
    transition: padding-top 0.3s ease;
}

#main-wrapper.shifted-up {
    padding-top: 15vh;
}

#input-container {
    width: 100%;
    position: relative;
    margin-bottom: 1.5rem;
}

textarea {
    font-size: 1.5rem;
    text-align: left;
    min-height: 56px;
    max-height: 25vh;
    resize: none;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: #414141 transparent;
    overflow: hidden;
}

/* Custom scrollbar */
textarea::-webkit-scrollbar {
    width: 4px;
}

textarea::-webkit-scrollbar-track {
    background: transparent;
}

textarea::-webkit-scrollbar-thumb {
    background: #414141;
    border-radius: 14px;
}

textarea::-webkit-scrollbar-thumb:hover {
    background: #666;
}

#reset-btn {
    top: 10px;
}

/*  Stats  */

#stats-wrapper {
    width: 100%;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.14s ease;
    pointer-events: none;
}

#stats-wrapper.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.stat-card {
    border: 1.4px solid #414141;
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    transition: all 0.14s ease;
}

.stat-card:hover {
    border-color: #fff;
    transform: translateY(-1.4px);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.14);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1.4px;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 11px;
    font-weight: 200;
    color: #414141;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

/*  Expand toggle  */
#expand-btn {
    width: 100%;
    background: transparent;
    border: 1.4px solid #414141;
    border-radius: 14px;
    color: #414141;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 1.4px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.14s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#expand-btn:hover {
    border-color: #fff;
    color: #fff;
}

#expand-btn .arrow {
    transition: transform 0.14s ease;
    font-size: 10px;
}

#expand-btn.expanded .arrow {
    transform: rotate(180deg);
}

/*  Detailed stats  */
#detailed-stats {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, margin-top 0.3s ease;
    margin-top: 0;
}

#detailed-stats.visible {
    max-height: 1000px;
    margin-top: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.detail-card {
    border: 1.4px solid rgba(65, 65, 65, 0.4);
    border-radius: 14px;
    padding: 10px;
    text-align: center;
    transition: all 0.14s ease;
}

.detail-card:hover {
    border-color: #414141;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 1.4px;
    line-height: 1;
    margin-bottom: 4px;
}

.detail-label {
    font-size: 10px;
    font-weight: 200;
    color: #414141;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

/* Responsive */
@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-value {
        font-size: 1.4rem;
    }
}
