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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
    opacity: 0.9;
    font-size: 1.1em;
}

main {
    padding: 30px;
}

.input-section, .output-section {
    margin-bottom: 25px;
}

textarea {
    width: 100%;
    height: 120px;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.2);
}

.controls-section {
    margin: 25px 0;
}

.encoding-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

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

.encode-btn {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
    color: white;
}

.decode-btn {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
    color: white;
}

.special-btn {
    background: linear-gradient(45deg, #fa709a, #fee140);
    color: white;
}

.clear-btn {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    color: white;
}

.utility-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    margin: 5px;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

button:active {
    transform: translateY(0);
}

.additional-controls {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.output-section textarea {
    background-color: #f8f9fa;
    border-color: #d1d5db;
}

@media (max-width: 768px) {
    .container {
        margin: 10px;
    }
    
    main {
        padding: 20px;
    }
    
    .encoding-buttons {
        justify-content: center;
    }
    
    button {
        font-size: 12px;
        padding: 6px 12px;
    }
}