* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1 {
    background-color: #4a90e2;
    color: white;
    text-align: center;
    padding: 20px;
    margin: 0;
    font-size: 24px;
}

.input-section {
    padding: 20px;
}

#textInput {
    width: 100%;
    min-height: 300px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#textInput:focus {
    outline: none;
    border-color: #4a90e2;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.stat-item {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.count {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #4a90e2;
}

.buttons {
    display: flex;
    gap: 10px;
    padding: 20px;
    justify-content: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#clearBtn {
    background-color: #dc3545;
    color: white;
}

#clearBtn:hover {
    background-color: #c82333;
}

#copyBtn {
    background-color: #28a745;
    color: white;
}

#copyBtn:hover {
    background-color: #218838;
}

button:active {
    transform: translateY(1px);
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 20px;
        padding: 15px;
    }
    
    .input-section {
        padding: 15px;
    }
    
    #textInput {
        min-height: 200px;
        font-size: 14px;
    }
    
    .stats {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 8px;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .count {
        font-size: 20px;
    }
    
    .buttons {
        flex-direction: column;
        padding: 15px;
    }
    
    button {
        font-size: 14px;
        padding: 10px 20px;
    }
}
