.hdwc-wrap {
    max-width: 900px;
    margin: 30px auto;
    background: #ffffff;
    color: #333333;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.hdwc-title {
    color: #2196F3;
    margin: 0 0 20px 0;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
}

.hdwc-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.hdwc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.hdwc-btn-primary {
    background: #2196F3;
    color: #fff;
}

.hdwc-btn-primary:hover {
    background: #1976D2;
    transform: translateY(-1px);
}

.hdwc-btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.hdwc-btn-secondary:hover {
    background: #e0e0e0;
}

.hdwc-editor-container {
    position: relative;
    margin-bottom: 20px;
}

#hdwc_text {
    width: 100%;
    min-height: 300px;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    resize: vertical;
    font-size: 16px;
    line-height: 1.6;
    transition: border-color 0.3s ease;
}

#hdwc_text:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.hdwc-quick-stats {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 15px;
}

.hdwc-result {
    margin-top: 30px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.hdwc-result.visible {
    opacity: 1;
    transform: translateY(0);
}

.hdwc-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hdwc-stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.hdwc-stat-card:hover {
    transform: translateY(-2px);
}

.hdwc-stat-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.hdwc-stat-label {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

.hdwc-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #2196F3;
}

.hdwc-stat-sub {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.hdwc-advanced-stats {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.hdwc-advanced-stats h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.hdwc-stat-row {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

/* Switch styles */
.hdwc-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-left: auto;
    font-size: 14px;
    color: #666;
}

.hdwc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.hdwc-slider {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
    background-color: #ccc;
    border-radius: 20px;
    margin-right: 8px;
    transition: .3s;
}

.hdwc-slider:before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: .3s;
}

input:checked + .hdwc-slider {
    background-color: #2196F3;
}

input:checked + .hdwc-slider:before {
    transform: translateX(20px);
}

@media (max-width: 768px) {
    .hdwc-wrap {
        margin: 15px;
        padding: 20px;
    }

    .hdwc-toolbar {
        flex-direction: column;
    }

    .hdwc-btn {
        width: 100%;
    }

    .hdwc-switch {
        margin: 10px 0;
    }

    .hdwc-result-grid {
        grid-template-columns: 1fr;
    }
}
