*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}
body{
    background: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    flex-direction: column;
}
.HeaderTitleContainer{
    text-align: center;
    margin-bottom: 20px;

    h1{
        font-size: 24px;
        color: #333;
        margin-bottom: 8px;
    }
    span{
        font-size: 14px;
        color: #666;
    }
    .auto-save-indicator{
        margin-top: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        
        .auto-save-status{
            font-size: 12px;
            font-weight: 600;
            color: #4a90e2;
            display: flex;
            align-items: center;
            gap: 6px;
            
            &::before{
                content: '';
                width: 8px;
                height: 8px;
                background: #4a90e2;
                border-radius: 50%;
                display: inline-block;
                animation: pulse 2s infinite;
            }
        }
        
        .save-status{
            font-size: 11px;
            color: #666;
            opacity: 0.7;
            transition: opacity 0.3s ease, color 0.3s ease;
        }
        
        .save-status:not(:empty){
            animation: fadeIn 0.3s ease;
        }
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 0.7;
        transform: translateY(0);
    }
}
.container{
        max-width: 991px;
        width: 100%;
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

        .toolbar{
            padding: 20px;
            background: #ffffff;
            border-bottom: 1px solid #eaeaea;
            
            .head{
                display: flex;
                grid-gap: 12px;
                margin-bottom: 20px;
                flex-wrap: wrap;

                #filename{
                    max-width: 120px;
                    padding: 8px 12px;
                    border-radius: 8px;
                    border: 1px solid #e0e0e0;
                    outline: none;
                    font-size: 14px;
                    transition: border-color 0.2s ease;
                }
                #filename:focus{
                    background: #ffffff;
                    border-color: #75b0fc;
                }

                select{
                    background: #fff;
                    border: 1px solid #e0e0e0;
                    border-radius: 8px;
                    outline: none;
                    cursor: pointer;
                    padding: 8px 12px;
                    font-size: 14px;
                    transition: all 0.2s ease;
                }
                select:hover{
                    background: #fdfdfd;
                    border-color: #75b0fc;
                }
                .color{
                    background: #fff;
                    border: 1px solid #e0e0e0;
                    border-radius: 8px;
                    outline: none;
                    cursor: pointer;
                    display: flex;
                    align-items: center;
                    grid-gap: 8px;
                    padding: 0 12px;
                    transition: all 0.2s ease;

                    span{
                        font-size: 14px;
                        color: #333;
                    }
                    input{
                        border: none;
                        padding: 0;
                        width: 28px;
                        height: 28px;
                        background: #fff;
                        cursor: pointer;
                        border-radius: 4px
                    }
                }
                .color:hover{
                    border-color: #75b0fc;
                }
            }
            .btn-toolbar{
                display: flex;
                flex-wrap: wrap;
                align-items: center;
                grid-gap: 8px;

                button{
                        background: #fff;
                        border: 1px solid #e0e0e0;
                        border-radius: 8px;
                        cursor: pointer;
                        width: 40px;
                        height: 40px;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        font-size: 18px;
                        color: #333;
                        transition: all 0.2s ease;
                }
                button:hover{
                    background: #f0f2f5;
                    border-color: #75b0fc;
                }
            }
        }
        #content{
            padding: 24px;
            outline: none;
            max-height: 60vh;
            height: 60vh;
            overflow: auto;
            line-height: 1.6;
            font-size: 16px;
            color: #333;
        }
        #content:empty:before {
            content: attr(placeholder);
            color: #999;
            font-style: italic;
            pointer-events: none;
        }
        
        .word-count-container{
            padding: 16px 24px;
            background: #f8f9fa;
            border-top: 1px solid #eaeaea;
            display: flex;
            justify-content: center;
            gap: 32px;
            flex-wrap: wrap;
            
            .count-item{
                display: flex;
                align-items: center;
                gap: 8px;
                
                .count-label{
                    font-size: 13px;
                    font-weight: 500;
                    color: #666;
                }
                
                .count-value{
                    font-size: 14px;
                    font-weight: 600;
                    color: #333;
                    background: #fff;
                    padding: 4px 8px;
                    border-radius: 4px;
                    border: 1px solid #e0e0e0;
                    min-width: 32px;
                    text-align: center;
                    transition: all 0.2s ease;
                }
                
                &:hover .count-value{
                    background: #f0f2f5;
                    border-color: #75b0fc;
                }
            }
        }
}

#showcode[data-active="true"]
 {
    background: #4a90e2;
    color: white;
    border-color: #4a90e2;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .HeaderTitleContainer,
    .toolbar,
    .word-count-container {
        display: none !important;
    }
    
    .container {
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-width: 100%;
        margin: 0;
    }
    
    #content {
        max-height: none;
        height: auto;
        overflow: visible;
        padding: 0;
        outline: none;
    }
    
    #content:empty:before {
        display: none;
    }
}