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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

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

header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

main {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

textarea {
    width: 100%;
    min-height: 300px;
    padding: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
}

textarea::placeholder {
    color: #999;
    font-style: italic;
}

.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

button {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

#convertBtn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    flex: 1;
}

#convertBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

#convertBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#clearBtn {
    background: #f8f9fa;
    color: #666;
    border: 2px solid #e1e5e9;
}

#clearBtn:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.error-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.success-message {
    background: #efe;
    border: 1px solid #cfc;
    color: #363;
}

.info {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #4facfe;
}

.info h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.info ol {
    padding-left: 1.5rem;
}

.info li {
    margin-bottom: 0.5rem;
    color: #666;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    header {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    main {
        padding: 1.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    textarea {
        min-height: 250px;
        font-size: 12px;
    }
}