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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    min-height: 100vh;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 300;
}

.input-section, .seed-section {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

#inputText {
    width: 100%;
    height: 200px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    resize: vertical;
    transition: border-color 0.3s ease;
}

#inputText:focus {
    outline: none;
    border-color: #3498db;
}

.controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

#seedText {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    transition: border-color 0.3s ease;
}

#seedText:focus {
    outline: none;
    border-color: #3498db;
}

#letterCount, #ngramSize {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

#letterCount:focus, #ngramSize:focus {
    outline: none;
    border-color: #3498db;
}

#generateBtn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#generateBtn:hover {
    background-color: #2980b9;
}

#generateBtn:active {
    transform: translateY(1px);
}

.output-section {
    margin-bottom: 20px;
}

.output {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.status {
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #666;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .control-group {
        justify-content: center;
    }
    
    #generateBtn {
        width: 100%;
    }
}